[Learning Experience] Git Quick Start

1. Download Git

Official website download: https://git-scm.com/downloads

Domestic mirror download: https://registry.npmmirror.com/binary.html?path=git-for-windows/

2. Install Git

1. Double-click the downloaded installation package

 2. Select the installation path

3. The default next step - component

4, the default next step - in the name of the start menu 

5. The default next step - editor

6. The default next step - the name of the main branch master

 7. Default next step - adjust the system environment path of Git

8. Default next step - select SSH executable file 

 

9. Default next step - select HTTPS backend transmission

10. Default next step - configure the trailing line conversion character

11. Default next step - configure Git Bash terminal emulator

 12. Default next step-select the default git pull command behavior

13. Default next step - Configure Credential Manager

 

14. Default next step - configure additional options

15. Default next step - use experimental features

16. Click to install

 17. Test whether Git is available: Right-click the mouse and Git GUI Here and Git Bash Here appear, indicating success.

Git GUI Here is a visual Git software, Git Bash Here means opening the Git console here

3. Use Git

(1) Introducing the git partition:

        The work area, temporary storage area, and warehouse area are all local

(2) Create a local git repository:

1. Create

git init

2. Settings:

git config user.name "wangwang"
git config user.email "[email protected]"

3. View file status:

git status

4. Add the file to the temporary storage area:

git add filename.py

5. Submit all files in the temporary storage area to the warehouse area:

git commit -m '备注说明'

6. Clone the project from GitHub to local (only do this for the first time)

git clone https://github.com/xxxx/xxxx.git

7. Submit the files in the warehouse area of ​​the local Git project to GitHub

git push

[Note] After git push, you need to enter your GitHub account and password to successfully submit to GitHub.

8. Pull the code from GitHub to the local

git pull

Guess you like

Origin blog.csdn.net/qq_39780701/article/details/130097664