[Tool use] - git implements gitee managed code and checkout code

1. Download the Git tool

Git download address 1: https://git-scm.com/download/win

git下载2:https://mirrors.tuna.tsinghua.edu.cn/github-release/git-for-windows/git/Git%20for%20Windows%202.40.1/

Install after download is complete

The installation directly executes the exe executable program, and clicks the installation in the next step.
After the installation is complete, right-click on the blank space on the desktop, and the git icon will appear to indicate that the installation is successful.

2. How to host local code in gitee

  • Step 1: Register and log in to Gitee official website: https://gitee.com/
  • Step 2: Create a new warehouse
  • insert image description here
    insert image description here
    After the warehouse is created, as shown in the figure:

insert image description here

1. Create the project you want to submit to the gitee warehouse

2. Right-click on the blank space in the project folder and select Git Bash here

3. Initialize git

git init

At this point, a hidden folder of .git will appear in the project folder
insert image description here

4. Configure git tool parameters

insert image description here

5. Add the project code file into the submission directory

git add .

6. Bind the gitee warehouse path to git

git remote add origin https://gitee.com/XXXXXXX你的仓库位置.git

7. Submit code

git commit -m'提交时的备注信息'

8. Push the code to the repository

git push origin master

9. After the push is completed, you can see that there is code in gitee

insert image description here

3. How to download someone else's code in gitee or github

1. Directly download the code compression package

insert image description here

2. git checkout code

insert image description here

  • Copy the address of the warehouse
  • Create a new folder, right click on Git Bash here in the folder
git clone 黏贴仓库的代码路径

insert image description here

4. Update the new code in the repository

1. Delete all and download again

2. Implement code update (must be warehouse manager or development team)

git pull origin master

Implement github to create warehouses and submit codes in the same way

Supongo que te gusta

Origin blog.csdn.net/gjb760662328/article/details/130493966
Recomendado
Clasificación