1

When I run git branch I get:

A 
B
C
D
E
F

What I'd like to see is something like this:

Merged                                    Unmerged
A *                                       F
C                                         E
D                                         B

Where the * shows the current branch and where the branches are listed in time order (i.e. most recent first).

I'm aware of various git GUIs but I'd just like a simple listing like this.

Is this possible and, if so, how?

Snowcrash
  • 66,400
  • 60
  • 203
  • 323
  • What do you mean by "most recent branch"? Do you mean the branch whose tip has the most recent committer date? – jub0bs Apr 16 '15 at 14:10
  • "most recent branch" - a branch on which I have worked most recently. – Snowcrash Apr 16 '15 at 14:38
  • You're gonna have to be more specific... Do you mean the one on which you last created a commit? – jub0bs Apr 16 '15 at 14:39
  • @Jubobs To me it seems crystal clear. I worked on a branch. I'm now typing here in this browser window. The branch in the sentence "I worked on a branch". – Snowcrash Apr 16 '15 at 14:43
  • An asterisk is shown next to the current branch (if any). This branch may or may *not* be the one you've worked on most recently. As an example, you may have just made a commit on branch `C` and then checked out branch `A` right after. What I'm asking you to clarify is what you mean by "listed in time order". – jub0bs Apr 16 '15 at 14:53
  • The [man page](https://www.kernel.org/pub/software/scm/git/docs/git-branch.html) will help with some of this... especially `git branch -v`, `git branch --merged` and `git branch --no-merge`. For sorting see http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit – hinerm Apr 17 '15 at 19:57

0 Answers0