0

I changed the directory of two files in GitHub. Now, no matter what I try, Git will not push any changes onto GitHub. The error I get is:

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:MyGitHub/foo.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.

This solution does not work for me. This solution does not work for me. Re-cloning my remote repository to my local does not work. Even entirely deleting the file in github (I have it saved elsewhere) does not work.

How do I make this error go away and resume the ability to push onto my GitHub again?

Forklift17
  • 2,245
  • 3
  • 20
  • 32
  • https://stackoverflow.com/search?q=%5Bgit%5D+hint%3A+Updates+were+rejected+because+the+tip+of+your+current+branch+is+behind – phd Jun 06 '20 at 23:40
  • 1
    You need either `git pull` or `git push --force`. – phd Jun 06 '20 at 23:40

0 Answers0