relation chart
git checkout -- target
Discard the changes cached in the content of the target file has been made
git checkout .
All modifications cached to give up the current directory.
Contrast: git rm <target> file is tracked throughout the targe delete cached in
git branch -d branchname
Deleted branches
git diff
View of the difference workspace and cached.
git diff --cache
Check with local repositorty the difference cached.
git diff HEAD
View differences workspace and the local repository.
git reset –mixed
This is the default mode, git without any parameters is reset, it falls back to a version, leaving only the work area, and rollback local repositorty cached information
git reset –soft
Fall back to a version, only to rollback the local repositorty information, and will not return to the cached level. If you have submitted, it can directly commit
git reset –hard
Completely fall back to a version, the local workspace will become a version of the content
git revert commitID
Roll back to a specific historical version, HEAD pointer forward, that is, to re-submit a version with a history (git reset HEAD pointer after the move)
Run git revert former must ensure that the changes made already commit