Quantcast
Viewing latest article 5
Browse Latest Browse All 5

Git push doesn't ignore files in .gitignore

I committed some files that I shouldn't commit.Then I added these files in .gitignore and I did this:

git rm -r --cached somefile

and I committed again.

git status shows:

# On branch experiment
nothing to commit, working directory clean

I do git ls-files and these files are not listed.

But when I do git push origin somebranch, these files are still being pushed (they're too large to push to github so it fails).

why is this? what should I do?


Viewing latest article 5
Browse Latest Browse All 5

Trending Articles