Sunday, November 15, 2009

ignore files that are already tracked in git

Scenario:

"log/test.log" has already been "git added" but I wanna ignore any further modifications made to the file.

Solution: Update .gitignore and run "git update-index"

# .gitignore

log/**/*

# run git update-index

git update-index --assume-unchanged log/test.log

No comments: