Add the following lines to the [alias] section of your .gitconfig file
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
Now you can use git ignore my_file
to ignore changes to the local file, and git unignore my_file
to stop ignoring the changes. git ignored
lists the ignored files.
This answer was gleaned from http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html.