So I'm fairly new to git and I've gotten in a bit of a pickle.
I have many new changes to my local copy that conflict with my github repo (however my local copy is correct and I'd like to just overwrite the remote repo). The local and remote copy have diverged by 2 and 3 commits.
I also accidentally added a few very large csv files to my local commit and now I am unable to push to the remote repo with git push -f
because github rejects the large files.
Now I deleted the files and removed them from the commit with git rm --cached "filename.csv"
and git commit --amend -CHEAD
and they are no longer in the commit as far as I can tell from git ls-files | grep "*.csv"
which returns blank.
However when I try to use git push -f
now after they are no longer tracked, github still detects them and rejects my push because they are too large although they are no longer on the filesystem or in the commit.
How can I push the local copy to overwrite the remote and get the push to realize I no longer have the large files?
Thanks in advance for any and all git advice... it can be a bit confusing for a newbie.