How do you remove an invalid remote branch reference from Git?

In my current repo I have the following output: $ git branch -a * master remotes/origin/master remotes/public/master I want to delete remotes/public/master from the branch list: $ git branch -d remotes/public/master error: branch ‘remotes/public/master’ not found. Also, the output of git remote is strange, since it does not list public: $ git remote show origin … Read more

master branch and ‘origin/master’ have diverged, how to ‘undiverge’ branches’?

Somehow my master and my origin/master branch have diverged. I actually don’t want them to diverge. How can I view these differences and merge them? 1 17 I had this and am mystified as to what has caused it, even after reading the above responses. My solution was to do git reset –hard origin/master Then … Read more

What are some examples of commonly used practices for naming git branches? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago. Improve this question I’ve been using a local git repository interacting with my group’s CVS repository for several months, … Read more