Header logo.
small hallucinations
homeyearstagsaboutrss

Untracking files in Git

Normally, you can prevent Git from tracking files by adding them to .gitignore.

But if files are already tracked, Git will continue to track them even after you add them to .gitignore.

We first need to remove the tracked files from Git's index, then add all the files in the current directory—including .gitignore—back to it. Now .gitignore will take effect.

1git rm -r --cached .
2git add .