local

1. Add a user name and email address. Git config –global user. Name “name” git config –global user. Email “[email protected]

2. Create a local repository git init

Git add file name/folder name

Git status Specifies the status of each project file. Green, newly added, red, unadded is the description of the commit version of git commit-m

Git reset HEAD unsets the memory buffer

Git log Check the version number

Git reset –hard HEAD^ Git reset –hard

Git reflog displays the version number

Remote:

Register an account. 1. Create a public key

To create an SSH Key, run the following command: ssh-keygen -t rsa -c [email protected]

In the specified directory, an id_rsa.pub file is generated. The contents of this file are the public key

2. Create a remote repository -> Create a repository add the repository name if it is not private, select public

Git push -u origin git push -u origin

4. Git Clone HTTPS

Git checkout branch name Merge branch name

Conclusion: Git config –global user.name “username” git config –global user.email [email protected] 2, Git config user.name git config user.email Git branch -r ③ Create a new branch git branch name ④ Change the branch git checkout name 5, Git add 7, git commit -m ‘comment’ 8, git push origin branch name 9, second time pull git pull

The detailed procedures of the project are as follows: 1. The team leader creates the remote repository and adds members. 2. Git checkout -b branch name (” master “) git checkout -b branch name (” master “) Git push origin git push origin Git push origin git push origin git push origin git push origin git push origin git push origin git push origin