Ignore modified (but not committed) files in git?
Solution 1:
check out the git-update-index man page and the --assume-unchanged bit and related.
when I have your problem I do this
git update-index --assume-unchanged dir-im-removing/
or a specific file
git update-index --assume-unchanged config/database.yml
Solution 2:
A newer and better option is
git update-index --skip-worktree
which won't be lost on a hard reset or a new change from a pull.
See the man page.
And a comparison at http://fallengamer.livejournal.com/93321.html
Solution 3:
Use this code
git update-index --assume-unchanged file-name
Solution 4:
What I usually do is
git stash
git whatever-else
git stash apply
git stash clear