Based on Daniel Hilgart's answer, I would recommend the following steps
Run git fetch --all to make sure you have the latest changes from all upstream repositories
Then run git branch -vva - (note double -v). This will print all branches ( a ), and for each branch, the last commit and branch information upstream (if an upstream is set).
The result will look like this:
br1 88006cd Branch br2 0b68b6f [origin/br2] New commit c 9ed6569 Dummy * master f4664d4 [origin/master: ahead 1] my commit remotes/origin/HEAD -> origin/master remotes/origin/br3 9ed6569 Dummy remotes/origin/master 9ed6569 Dummy
You can see that you have four local branches (master, c, br1, br2). master and br2 have upstream branches. br2 is fully pressed, the host has one local commit that is not yet pressed ("ahead 1").
br1 and c are local branches without upstream information. To do this, you must check and decide what to do - they can be completely combined and redundant; or you can push them upstream; or you may want to combine them locally, for example. to master, then click this. To see branches that are not fully merged with your local master, use git branch --no-merged master . In this example, this will print “br1 br2” (since branch c is the ancestor of the master).
Finally, you can see that for br2 the branch name for the / br 2 branch is specified, which does not exist. This means that the remote repository deleted this branch (and you selected this removal using "git remote prunes" or "git fetch -p"). Again, you have to decide whether you want to discard your local commits, or click or merge them again.
source share