I recently merged a branch I was working on with the 'master' branch. I must have (still kind of a git n00b) done something when pushing or pulling that created both an origin/master
and an origin/HEAD
branches. Unfortunately, I didn't keep a record of what commands I ran that did this. Currently, my team has a bunch of code in their master copies that I'm not getting when I check out the project (even if I clone
to a new location).
Here's a screenshot of what Sourcetree is showing:
I really need to get this resolved so I can keep working so any help will be greatly appreciated.
The correct way is to 1> checkout master 2> click merge 3> select all branches in the drop-down menu. The step 3 is important otherwise. 4> select the develop branch then click OK. You can also do the same thing in the reverse order.
It is just a pointer to master, a symbolic link if you wish. You can safely delete it by doing the following in a terminal (or git bash/cygwin for windows users):
git remote set-head origin -d
now it should be gone:
$ git branch -r
origin/master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With