Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sharbel93/ebcf0b18782573f4d95f80caa3c84acb to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

thank you so much it helped me a lot.

@YUVI-8000

Copy link
Copy Markdown

thank you so much it worked well !!

@DAM92578

Copy link
Copy Markdown

Thank you very much!

@rmpranto

Copy link
Copy Markdown

Thanks

@mungaig

mungaig commented Nov 18, 2024

Copy link
Copy Markdown

Thanks so much

@Ashwani133

Copy link
Copy Markdown

Can somebody please explain, why do we get this error? And how these above lines of code solves the issue!
ps-issue is resolved. Please someone explain.

@PrincyEdwin

Copy link
Copy Markdown

Thanks a lot!

@oJotagee

Copy link
Copy Markdown

Thank you sir.

@SonamPal001

Copy link
Copy Markdown

Thankyou so much!!!

@ZedElement

Copy link
Copy Markdown

Thanks

@debliak

debliak commented Dec 9, 2025

Copy link
Copy Markdown

Thank you so much!

@bilal-tunchie

Copy link
Copy Markdown

Thank you so much!

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