Git Cleaning Ignored File When Gitignore Added

[Solved] Git Cleaning Ignored File When Gitignore Added | Shell - Code Explorer | yomemimo.com
Question : GIT - Cleaning ignored file when .gitignore added after changes

Answered by : brave-bear-559060p1sbxx

# Remove the files from the index (not the actual files in the working copy)
$ git rm -r --cached .
# Add these removals to the Staging Area...
$ git add .
# ...and commit them!
$ git commit -m "Clean up ignored files"

Source : https://www.git-tower.com/learn/git/faq/ignore-tracked-files-in-git | Last Update : Fri, 10 Dec 21

Question : git remove ignored files

Answered by : dennis-muensterer-10gav4t7fjtq

git rm --cached <file>
git rm -r --cached <folder>

Source : https://stackoverflow.com/questions/1274057/how-can-i-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitign | Last Update : Tue, 21 Sep 21

Answers related to git cleaning ignored file when gitignore added after changes

Code Explorer Popular Question For Shell