Bootstrap FreeKB - Git (Version Control) - Resolve "Your branch is based on but the upstream is gone"
Git (Version Control) - Resolve "Your branch is based on but the upstream is gone"

Updated:   |  Git (Version Control) articles

Let's say the git status command returns the following.

~]$ git status
On branch master
Your branch is based on 'origin/master', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

nothing to commit, working tree clean

 

This can occur when you have created a new repository using the git init command with the --bare flag and you are adding and commit the very first file to the empty repository. In this scenario, the error should no longer appear after you have committed and pushed the very first file to the new repository.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


July 22 2023 by Binod
It's very very Helpful.. Thanks!! Easy to understand

Add a Comment


Please enter 650bd8 in the box below so that we can be sure you are a human.