Tsumugi Kotobuki
Tsumugi Kotobuki

Reputation: 123

files which are supposed to be ignore are still getting published after pushing them (.gitignore doesn't work)

I tried the following steps: http://blog.jonathanchannon.com/2012/11/18/gitignore-not-working-fixed/

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"

but I just end up, after pushing it, with the files .gitignore was supposed to ignore.

Upvotes: 0

Views: 57

Answers (1)

dan
dan

Reputation: 13262

You can try to remove individual files, using: git rm --cached <file>.

If the file is already commited and you would like to not push any new changes you can use:

git update-index --assume-unchanged <file>

To list the ignored file you can use:

git ls-files -v | grep "^[[:lower:]]"

Upvotes: 1

Related Questions