1. Basic usage
Git config-global user.name Specifies the user name
Git config-global user.email Email address
Must set the user name and email, one is not to submit the code submission is not up
2. Initialize the repository
1) Enter the warehouse folder first
2) right-click git bash here
3) Enter the command git init
4) Open the warehouse folder, check “show hidden files”, you can see the created warehouse
3. View the local library
Git status = “no conmmits yet” git status = “no conmmits yet
2) So you need to create, for example, create hello. TXT, enter the command vim hello. TXT
3) At this time, vim editing mode will be entered, where I is for input; Esc is exit; When exiting the edit mode of I, press YY twice to copy, and then press P to paste; After the editing is complete, press: to enter the input mode at the bottom, enter wq and press Enter to exit the VIm editing mode
4) When the command line interface is returned to the local library query
It is in the workspace and is not tracked by Git, so it is red.
4. Add to the staging area
1) Add the file to the temporary storage area, git add hello. TXT, and then check git status
Git rm –hello. TXT is still in the staging area. You can delete it at any time (git rm –hello.txt)