Simple_Shooter is not allowing me to push the files

Are you also using LFS?

Yes

What have you used BFG to remove? You did not specify earlier.

I was not able to push commits.
So, I thought to run BFG, just in case if there is any unnecessary files or needs cleaning.

As stated earlier there’s various ways you can use BFG to remove files from your history. Which did you use i.e. what command?

java -jar bfg.jar --strip-blobs-bigger-than 100M SimpleShooter.git

Try this
https://confluence.atlassian.com/stashkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-282988530.html

I did this but it didn’t work :

zkc08@Advits-Mac-mini SimpleShooter % sudo git config --global http.postBuffer 157286400  

Password:
zkc08@Advits-Mac-mini SimpleShooter % 


Did you then push after doing that?

Yes I did force push. In normal push this comes :

zkc08@Advits-Mac-mini SimpleShooter % git push origin master
warning: redirecting to https://github.com/zkc08/SimpleShooter.git/
To http://github.com/zkc08/SimpleShooter.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'http://zkc08@github.com/zkc08/SimpleShooter.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

That means your history isn’t the same, most likely due to using BFG. If you’re sure you want to overwrite your remote with your local you can force push.

Should I force push

How many commits does your remote have?

only 1

If that’s the initial commit then you’re not really risking losing any work, really.

Yes it’s the initial commit only.

Then doing a force push shouldn’t be that much of a problem.

It failed

With what error?

The same as before

Privacy & Terms