Git to James: Abandon all hope, ye who enter here


I just upgraded to Ubuntu Studio 20.04 – fresh install, because some things had been going wrong with app menus etc.

I cloned from supercollider/supercollider.

I switched “origin” to “upstream” and git remote add-ed origin to point to my fork.

I created a topic branch and added a commit.

Now git push origin topic/ConditionTimeout says:

So I tried fetching upstream and merging into develop, and pushing the “develop” updates to my fork – at this point, github website says that my fork is even with supercollider:develop. Then I rebased my topic branch.

This didn’t fix the problem.

How is my local branch both even with upstream and behind upstream?


Sorry this is frustrating you!

I think the answer is here:

This message is telling you something is wrong with the topic/ConditionTimeout branch, not develop. The first part tells you specifically which branch was rejected from updating by the remote, the second part tells you why. Your “current branch” when you receive this message is topic/ConditionTimeout, so this message is telling you your changes cannot be pushed cleanly to its remote counterpart – the topic/ConditionTimeout branch on the remote origin repository. This is likely the point of confusion, as you said this is a new branch before pushing – were you aware that you already have a branch with this name? It has commits from 2019, so you might want to choose a different branch name or consider deleting the older branch depending on whether you want to save that work.

One slightly confusing thing about this error message is the use of the word “behind”. This really means the remote branch has commits your local branch does not, and so in the commit graph where commits are vertices and parent relationships are directed edges, the commit you are trying to push is not a direct descendent of the tip of the remote branch. Is this what most people would think when they see “behind”? No, because the “ahead” branch is older both in time-last-updated and in the commit on develop it was branched from. But there is no true, intuitive meaning for behind or ahead in this graph anyway. I would suspect this wording was chosen because it makes sense in what is probably by far a more common case, when the remote branch and local branch start at the same commit, but then the remote branch gains commits the local branch does not. Then the local branch tip is a direct ancestor of the remote branch tip.

Hope this helps.

Ahh… after stepping away from the computer for a while, I wondered if maybe I had accidentally chosen a branch name that I had already used before. And I didn’t discover this in the local repository because I cloned from upstream.

Thanks for the tip. I got quite flummoxed (and I suspect I’ll continue to have difficulty understanding git’s printed messages for quite some time :laughing: ).

I’ll just delete the old branch. It looks like a much less elegant solution (though the unit tests are probably OK).


Off-topic: There’s no tick box to mark the solution. I don’t understand why that would be hidden for me…? I can “like” the post, link to it, flag it, edit it, bookmark it, delete it, or “other” menu, but not mark a solution.



your post is in Development, not Questions.

Oh it’s per category :laughing:

The world moves on and my mind doesn’t…

Anyway the git problem is resolved. Thanks.


1 Like

I can’t help you but let me say I sympathise with you James. Git really can be a nightmare from time to time!!

1 Like