Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Git: Uptream is Gone

DZone's Guide to

Git: Uptream is Gone

· Agile Zone ·
Free Resource

Discover how you can take agile development to the next level with low-code.

I came across a git repo recently that output this message with every operation I did:

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!

Download this eBook to learn how to prepare your business for agile adoption, how to ensure the proper business-IT collaboration that is critical for agile development, and how to choose the right stakeholders to increase productivity and enable accelerated time-to-value.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}