Submit code
Git init Git Remote Add Origin Git pull Origin Master (-- allow-suggested -histories) git add. Git commit -m" git push -u origin masterCopy the code
basis
# Check the current status
git status
Check git's recent history
git log
git log --pretty=oneline
# Version rollbackGit reset --hard Commit the version numberCheck the user configuration
git config --global --list
# user SettingsGit config --global user.email git config --global user.emailUndo workspace changes
git checkout -- aa.md
Undo changes to the staging area
git reset HEAD aa.md The staging area is withdrawn from the workspace
git checkout -- aa.md # Workspace rollback
# config fileC:\Users\Administrator\.gitConfig (user information configuration)Copy the code
Remote warehouse
Add remote repository locally
git remote add origin https://gitee.com/zm5/demo01.git
Check the remote warehouse address
git remote -v
Push the local master branch to the remote repository
git push -u origin master
Delete the remote storage address
git remote remove origin
Copy the code
branch
# view branch
git branch
Create a branchGit branch Specifies the branch name# Switch branchesGit Checkout branch name# merge branchesGit merge Merge branch name# delete branchGit branch -d Name of the deleted branch // Exit the branch before deleting itCopy the code