# exclude everything somefolder/* # exception to the rule !somefolder/.gitkeep
git rm --cached [file] git update-index --assume-unchanged [file]