Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sharbel93/ebcf0b18782573f4d95f80caa3c84acb to your computer and use it in GitHub Desktop.
Save sharbel93/ebcf0b18782573f4d95f80caa3c84acb to your computer and use it in GitHub Desktop.
How to solve this problem of "! [rejected] master -> master (fetch first)"
First Do this ...
git fetch origin master
git merge master
Then, do this ...
git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
git branch -D tmp
Now everything works well.
@ThilanHemachandra
Copy link

thank you so much it helped me a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment