On Thu, 4 Oct 2012 02:12:19 -0700 (PDT)
maxhodges <m...@whiterabbitpress.com> wrote:

> Is master just a branch or is there anything special about it? If we
> delete it, can we just create a new branch called master? Do we need
> to Rebase to it or something to move the HEAD to it?

It's just a regular branch, nothing special at all in terms of its
technical implementation.
The only thing which is special about it, is that *by convention* a
newly created repository has its special HEAD reference pointing to a
branch named "master", but the branch does not yet exist, and comes to
existence when you record the first commit (w/o first doing something
like `git checkout -b someotherbranch`).

> Somethings weird happened and we're trying to make things right
> again. Somehow I have two branches called "origin/master" 

First, this issue has nothing to do with your question above.

Second, what you're facing is probably because you have one remote
branch, which is really "remotes/origin/branches" and one local
branch, which is called "origin/master" -- you can see the difference
by running `git branch -a`.

Just an example done on a real repository:

C:\tmp\repo>git branch -a
* master
  remotes/origin/HEAD -> origin/master

C:\tmp\repo>git branch origin/master

C:\tmp\repo>git branch -a
* master
  remotes/origin/HEAD -> origin/master

C:\tmp\repo>git branch
* master

Note that without the "-a" (meaning "all") option, `git branch`
shows you only your local branches.

To deal with this situation, refer to the remote branch via its
"fuller" name, remotes/origin/master.

Supposedly you should examine what's the difference between your local
branch "master" and your (probably wrongly named) branch
"origin/master" and decide which one to keep and which one to delete.
Also note that you can rename any branch using `git branch -m`.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to