Skip to content

Instantly share code, notes, and snippets.

@xiaoysh8
Last active November 23, 2018 06:28
Show Gist options
  • Save xiaoysh8/b5e77d9789b13f272403df7fda7292c4 to your computer and use it in GitHub Desktop.
Save xiaoysh8/b5e77d9789b13f272403df7fda7292c4 to your computer and use it in GitHub Desktop.
git ignore
How to ignore changed files (temporarily)
In order to ignore changed files to being listed as modified, you can use the following git command:
git update-index --assume-unchanged <file>
To revert that ignorance use the following command:
git update-index --no-assume-unchanged <file>
//回到从前
//增补提交
git log --online //simple display
git commit --amend --no-edit
git status -s //simple display
git reset file //stage to unstage or modified
git reset --hard HEAD //restore to lateset commit,clear everthing been modified or added.
git status -s //diplay nothing
//turn to previous version
git reset --hard HEAD^
//jump to different version
git checkout 1d7a143
git checkout 2dbe34d
git checkout master //return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment