Last Updated: September 29, 2021·
Ignore previously tracked files in Git
.gitignore prevents untracked files from being added to the set of files tracked by git, however git will continue to track any files that are already being tracked.
To stop tracking a file you need to remove it from the index. This can be done via:
git rm --cached <file>
Written by Ayman
A better git log
Please, oh please, use git pull --rebase
git commit --allow-empty
Have a fresh tip? Share with Coderwall community!
Post a tip
Best #Git Authors
Sponsored by #native_company# — Learn More