Quantcast
Channel: Git push doesn't ignore files in .gitignore - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Git push doesn't ignore files in .gitignore

$
0
0

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 all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>