Created
May 20, 2015 14:19
-
-
Save just3ws/aff32026a53764c4487d to your computer and use it in GitHub Desktop.
Toggle a file from it's local changes being recognized by Git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git-assume-unchangeable () { | |
git update-index --assume-unchanged "$@" | |
} | |
git-assume-changeable () { | |
git update-index --no-assume-unchanged "$@" | |
} | |
git-show-unchangeable () { | |
git ls-files -v | grep -e "^[hsmrck]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To ignore local changes
git-assume-unchangeable db/schema.rb
To resume recognizing local changes
git-assume-changeable db/schema.rb
To list the files marked as unchangeable
git-show-unchangeable db/schema.rb