Confused about IDEA's representation of my local and remote Git branches

I have a project locally that's also pushed to Bitbucket (it's private so far). I don't understand the relationship between what Git Bash says the existing local and remote branches are and what IDEA says. I'm quite new to Git, IDEA/Git, and Bitucket, so apologies if I'm just way thick.

Git Bash
$ git branch -a
  default (white) [yes, there's a branch named default, want to kill it]
* master (green)
  remotes/myapp/default (red)
  remotes/myapp/master (red)

IDEA > VCS > Git > Branches (popup)
+ New Branch
  Checkout Tag or Revision
--- Local Branches ---
  default -> myapp/default
--- Remote Branches ---
   Current branch: master

Far as I can see, IDEA doesn't think there's a local branch named master. Except for the fact that it's the current branch??? Am I reading this wrong? Is it a bug?


Dave Merrill

Comment actions Permalink

When you change branch (e.g. to default or any of the others) you should see that the master branch appears in the VCS popup, and the new current branch does not.

The current branch is displayed in the status bar at the bottom of the window ("Git: master") which brings up the popup when clicked.
IDEA doesn't show the current branch in the popup as there's nothing you can do with it from the popup. You can't check it out, "New Branch" effectively covers the "Checkout as new branch", compare, merge or delete as these operations don't make sense (e.g. merge current branch to current branch would do nothing).



Comment actions Permalink

Hmmm, that's what I thought must be the case after thinking about it for a while longer. It is a bit odd though -- your most important branch (the current one) is displayed in a unique location, but in smaller type than all the rest.

Part of it too is that I'm just a tad insecure around all this, since I'm so new to Git, and this isn't some throwaway Git playground repo, it's real stuff I care about.

Anyway, thanks for nailing this down,



Please sign in to leave a comment.