amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

[Known issue] Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched

Open jkroll-aws opened this issue 2 years ago • 9 comments

This message occurs now that the default branch has been renamed to "main", but your clone is still attempting to pull from "master".

To resolve this issue, run the following CLI commands in your local cloned repository:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

This will allow you to continue to pull the latest commits as usual.

Please refer to the announcement: https://github.com/aws/amazon-sagemaker-examples/discussions/3131

jkroll-aws avatar Feb 04 '22 16:02 jkroll-aws

this was so helpfull

DenisOuma avatar Jul 04 '22 03:07 DenisOuma

i had this issue with develop. what had happened to me (and may happen to others) is that we accidentally deleted develop on remote while merging a PR. so make sure that you haven't accidentally deleted your branch though a PR merge 😌 .

jlnbuiles avatar Jul 22 '22 15:07 jlnbuiles

I love it when I get a bunch of complicated git errors and then do a search, click on the first link that comes up, run jkroll-aws' 4 commands and everything then works perfectly : )

davidgsd avatar Dec 14 '22 01:12 davidgsd

you saved my life, thanks bro

blackmonk69 avatar Dec 19 '22 03:12 blackmonk69

Thank you so much! This solved my problem when the main on origin was renamed to main and tried to git pull.

DarkOwn3r avatar May 26 '23 10:05 DarkOwn3r

I'm a newbie in using git and github and finding a rapid solution at my first error is so fantabalous. Thanks very much !! I just had to use the first command line and everything was OK.

CrazyFranck23 avatar Aug 02 '23 20:08 CrazyFranck23

Thanks man, very helpful

Driton-Gashi avatar Nov 06 '23 16:11 Driton-Gashi

After following above steps getting this error>>>fatal: refusing to merge unrelated histories

sbichpuriya11 avatar Dec 19 '23 05:12 sbichpuriya11

Super helpful! Thanks! 😄

julianaconsolati avatar Feb 26 '24 18:02 julianaconsolati