I want to stop tracking certain files in Git that I've added to the .gitignore
file.
I used git rm --cached
(and also tried git rm -r --cached .
) but after running git add .
, a git commit --dry-run
tells me the files in my gitignore are "to be committed".
The contents of the .gitignore
file are:
/source/backup/*
/site/index.php
/site/userscript.user.js
What's wrong with this gitignore?
Things were working just fine when the only line was source/backup/*
. As soon as I added the second line, the source/backup/*
files are getting committed as well.