Git rm –cached file
Git rm — cached-r folder Delete a single folder from the remote repository, but keep it local
Git branch
Git checkout
Git checkout -b
6. Git log –oneline –graph –decorate –oneline — dedicate — dedicate
Git reflog displays all logs, including the version before rollback
Git log –oneline -2 –grep=’index.html’ git log –oneline -2 –author=’root –oneline -2 –author=’root’ –before=’2015-6-6′ git log –oneline -2 –author=’root’ –before=’one week’ git log –oneline -2 –author=’root’ –before=’three days’ before date
Git log –oneline –author=’root’ –after=’three days



Git status: -s is used to display files in the workspace and staging area
Git diff shows the difference between workspace and staging


Git diff check the difference between workspace and staging.
Git diff HEAD check the difference between the workspace and the HEAD (the current working branch)
Git diff –cached to see the difference between the staging area and the history area.
12, git reset – hard [HEAD ^ | version number] version back to the last commit (HEAD ^ ^ last HEAD ~ 100 before 100 times)
13. Git reset — Mixed: This is the default git reset with no parameters. If this is the default git reset, it will be retracted to a version with the same workspace, history and staging
Git reset -soft: rollback to a version. Only the history area information is rolled back. The workspace and staging area remain unchanged
Git reset — -hard: fully resets to a version, workspace, history, and staging.
Git checkout —
Git checkout — file — git checkout — file
Git merge

merge branch into current branch
17, git branch -d
18. Git Stash Hidden workbench (usually used when the current task is not completed and a new task needs to be launched in time without submitting the task code)
Check out the git stash list
Git Stash apply a workbench
21, git
22, Git stash pop

Apply a workbench and remove stash
@{}>
23. Git Stash Clear All stash at once
Git tag -a

-m git tag -a
Git tag -d
Git show
Git Push Origin v1.0 pushes tags to remote locations
Git push Origin — Tags push all tags at once
2> Git push Origin :refs/tags/v1.0
Git checkout < commit > git checkout < commit
Git remote Query information about remote repository
Git remote -v git remote -v

30, Git fetch origin
Git checkout -b

origin/

create the

branch and associate it with the remote

. 30+31 is fetching the branch and associating it with the remote



32, git branch — set-uppage-to =origin/dev create a link between a local branch and a remote branch.
33, Git remote origin set-url
Git remote rm origin Deletes the association with the remote repository
Git remote add Origin https://xxx.git Adds an association with a remote repository
Git -f -f -f -f -f -f -f -f -f -f -f