Git: upstream is gone
Your branch is based on 'origin/master', but the upstream is gone. (use "git branch --unset-upstream" to fixup)
I was delivering a workshop at the time so I kinda snarled at it and carried on with what I was doing, but later I looked up what is happening. This occurs when a branch is tracking a branch that the git repo doesn’t have any information about – the branches to be tracked aren’t in the local repo metadata.
In my case, it happened because I had created and then cloned an empty repo for training purposes – so origin/master
didn’t actually exist yet! I added a quick commit-and-push to my script and hope that I won’t be upstaged by this change that came in with git 1.8.5.
Hopefully this post will help someone else to avoid being upstaged or irritated by this as well!
helped it.
“I added a quick commit-and-push to my script…” I did this and nothing happened. I got an message:
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as ‘master’.
Everything up-to-date
googled this . still no beginner level answer.
Let me see if I can make this a bit clearer. When I saw this message, it was because I had cloned an empty repository. To fix it, I added one commit to my current master branch, then pushed the changes. My local branch was tracking the remote one as is the default behaviour after a fresh clone. Hope that helps!
Thanks. Worked
thanks, big help
If you don’t have files to add, you can also do the following
[code]
git branch –unset-upstream
get push –set-upstream origin master
[/code]
Works for me using BitBucket
Absolute help!
I tried pruning a renamed branch, everything was a mess, but “git branch –unset-upstream” was the only thing I needed to do.
Thanks for the tip!