I have a fork repo of Swift algorithm Club. I wanted to make a PR to this repo, so I tried to update my fork to pull the latest commits from the original repo (my fork was about 3 months behind), but it failed. In my case, the upstream’s name is raywenderlich. First, I ran
git fetch raywenderlich, then
git merge raywenderlich/master on my master branch.
git merge raywenderlich/master warning: refname 'raywenderlich/master' is ambiguous. Already up-to-date.
There was something wrong. I googled it.
It seemed I had some duplicated name branches for some reason. It looked like they were conflicted, and git merge couldn’t tell which one it should use for merging.
So, I renamed one.
git branch -m raywenderlich/master local-raywenderlich/master
git merge raywenderlich/master was run successfully! 😃🎉