1. Check the version history
·git log
· Go reflog
2. version rollback
· Git reset --hard HEAD ^ (HEAD represents the current version)
Behalf · HEAD ^ fall back on a version and so on
· HEAD ~ 1 above and empathy
· Can also use git reflog version history with a version number back and forth (git reset --hard + version)
3. undo changes
· Run git status command displays the work area, staging area, the current state of the warehouse. When all the work area code into the repository, and a warehouse to keep and will show the same time:
On branch master
nothing to commit,working tree clean
1. The temporary area code for revocation to the workspace:
· Git reset HEAD + filename
2. The revocation of the work area codes
· Git checkout + filename
4. Ref.
1. Contrast the local repository and workspace
· Git diff HEAD file name
2. Contrast the local repository versions Code
· Git diff HEAD HEAD ^ - filename
5. Delete Files
1. delete files or folders
2. The first withdraw to the workspace
· Git reset HEAD file name and then delete
3. withdraw from the repository
· Delete files or folders
·git add .
·git commit -m