14 Jul 2019
Stop tracking of already tracked files
Why? One scenario: you write on a paper using LaTeX, compile the
document, git add .
, git commit -m "created pdf"
, git push
, and
then you recognize that all the files you are not interested in,
i.e. basically all besides the .tex
file are tracked…
- put them in
.gitignore
recursively clean the index
git rm -r --cached .
rebuild index
git add .
commit your changes
git commit -am "Remove ignored files"
Of course, I had help in finding this. Thanks Matt Frear