Super detailed method of git clone a project

1. First create a new folder to save the project

For example, I have a folder named travel, and I put all the folders that I cloned later into this folder, then I need to open this folder in vscode first, then open the terminal in vscode, we connect Enter the command line here.

2. If you haven't set the git username and login email, you need to set it up before you can clone the project or submit files, etc.
Insert picture description here
3. After the configuration is complete, find the address of the project you want to clone, copy the address directly, and then Enter a git clone xxx URL in the terminal
Insert picture description here
. 4. After the clone operation is completed, you will find that there is an additional folder under the travel folder of the current directory. The content in this folder is the code we just cloned. Then cd xxx into this project, xxx is the name of the folder we cloned, for example, called gitproject, you must enter this project to execute the next installation dependency, otherwise an error will be reported.

$ cd gitproject

5. cnpm i or npm i install dependencies. At this time, the node_modes folder will be added to the left directory of vscode
Insert picture description here
. 6. npm run dev or npm run serve, this command depends on how to set the selection command in package.json in the project run.

7. If there is an error installing node-sass:
(1) Open cmd with administrator privileges
(2) npm uninstall node-sass
(3) npm install [email protected]

Guess you like

Origin blog.csdn.net/weixin_45811256/article/details/111411733