Skip to content
Discussion options

You must be logged in to vote

.gitignore only prevents untracked files from being added — it has no effect on files git is already tracking. Stop tracking it without deleting it locally: git rm --cached path/to/file, then commit. For a whole tree, git rm -r --cached . followed by git add . re-applies the ignore rules.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kevinchamplin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant