Retrieve Local Commit That Can't Push Out

Hey Ya’ll.

I attempted to push out a commit to a private repo I’m running; however,  I forgot that I had spit out a pretty sizable file 1GB in the repo directory and well…  It’s trying to push it out but is failing.  I fat fingered the app and pulled in an even older version of the repo as well.

Already tried:

 1 - replacing the zip file with a blank text doc.

 2 - trying to revert to the commit.  When I try this it’s giving me an error saying it needs to push to origin first.

Would buying some GLFS allow me to upload briefly?  I’m using the MAC GitHub App but am open to any solutions that can help fix this so I don’t have to rewrite all my code today.

Hi @starcrusherproductio, you must have two identical copies of your repo - one remote on github and another in your local computer. Changing files manually won’t work. Try next steps:

  1. Open command line and got to the directory, containing your local copy of the repo

  2. Type

    git status

and you’ll probably notice some red lines, telling you what files are missing. Even if the file is in the directory you should first add it to your repo via

git add filename

then don’t gorget to

git commit -m "your commit"

and only after

git push

Hope this helps)