0

I had committed a large file to the local repository. When it was taking a LONG time for the upload to the remote to take place, I stopped the upload and then ran:

git reset --soft HEAD~1

Afterwards, I ran

git add . -A
git commit -m "took out large file"
git push origin master

I got this error:

$ git push origin master
To git@repos.apostx.com:TOOLS/docs-howtos-and-scripts.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@repos.apostx.com:TOOLS/docs-howtos-and-scripts.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.

I then ran the following:

git pull
git push origin master

But I still get the same error. How can I come about this problem?

TIA

Casey Harrils
  • 2,793
  • 12
  • 52
  • 93

0 Answers0