- git install (window based)
Download window version of client from Http://git-scm.com/download to keep the default options
- Git basic configuration before use
Configure the user name and mailbox, and after the GIT installation is complete, right-click on the desktop to choose Git Bash here
" your name or nickname. " " your e-mail "
2.9. 3. Windows. 2
Ssh-keygen -T rsa-c "your mailbox"
- Add SSH keys on GitHub to copy the public key from "Id_rsa.pub" to GitHub
- If the test succeeds, hi xxx will appear.
SSH [Email protected]
' Copy the address of SSH or HTTPS on the project homepage '
- Warehouse initialization requires a CD command to enter the project folder and then initialize it
$ git init
- Generate a snapshot and deposit into the project index
$ git Add. #会递归添加当前工作目录中所有的文件
" Enter a hint message "
$ git log
$ git Reflog
$ git Branch -v # View the last commit of each branch $ git branch [branch name] -d [branch name] # Delete the branch
$ git checkout [branch name] -b [branch name] # Create and switch to a new branch
- Pull pulls to get the latest changes from other warehouses. In the second warehouse, make some changes, and then push the changes to the repository at the far end. Then the first warehouse pulls these changes
$ git pull
$ git reset--hard [SHA1]
Git version control