Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (11 sloc) 506 Bytes

Untrack files previously committed from new .gitignore

To untrack a single file, ie stop tracking the file but not delete it from the system use:

git rm --cached filename

To untrack every file in .gitignore:

First commit any outstanding code changes, and then run:

git rm -r --cached

This removes any changed files from the index(staging area), then run:

git add .

Commit it:

git commit -m ".gitignore is now working"

To undo git rm --cached filename, use git add filename

Something went wrong with that request. Please try again.