Tuesday, February 26, 2013

Git Remove a file from being tracked but not from source

Sometimes, you don't want to commit files like .project, .classpath, .DS_store. You may have already added all these in .gitignore but those files were previously commited.

You can do
git rm --cached {filename}
Your file would remain in your source directory.

1 comment: