xiaoysh8
8/11/2017 - 7:05 AM

git ignore

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