Git init
git Add File
git Add.
git commit-m "notes"
git log
Git reflog
git status
git diff (Git diff HEAD--file)
git reset--hard head~1 fallback last Commit
git reset--hard Commitid fallback to a commit
git checkout--file Discard workspace Modifications
Git reset HEAD file staging area fallback workspace
git rm file Delete files
Git Branch View branches
git branch dev Create Dev Branch
git checkout dev switch to Dev branch
git checkout-b dev Create and switch to Dev branch
git merge dev merges the Dev branch to the current branch
git branch-d Dev Delete branch
git branch-d Dev forcibly deletes a branch that has not been merged
git log--graph--pretty=oneline--abbrev-commit Branch Merge diagram
Git merge--no-ff-m "merge with--no-ff" dev merge dev branch with log
Git Stash Workspace Staging
Git Stash list Staging lists
git stash apply [email protected]{0} recovery workspace staging [email protected]{0} without deleting
git stash drop [email protected]{0} Delete workspace staging [email protected]{0}
git stash pop [email protected]{0} Recover and delete
Git remote repository
git remote-v Remote Library details
git checkout-b branch-name origin/branch-name local branch for creating and remote branch
Git branch--set-upstream branch-name Origin/branch-name Establish Association of local and remote branches
git tag <name> Create a new tag, default to head, or you can specify a commit ID
Git tag-a <tagname>-M "Blablabla ..." Label information can be specified
Git tag-s <tagname>-M "Blablabla ..." can be signed with PGP tag
git tag View all tags
Git push origin <tagname> can push a local tag
Git push origin--tags can push all the local tags that have not been pushed
Git tag-d <tagname> can delete a local tag
git push origin:refs/tags/<tagname> can delete a remote tag.
Summary of the Liaoche teacher's git tutorial, with the tutorial address Http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/
It's very good.
git command-line command summary