How to use git log --graph --oneline --all only on my local branches?

Ain't sure what you need but how about something like:

git log --graph --oneline --branches --not --remotes=*

Note that it may filter out the whole log (e.g. in the case when you have an up-to-date branch so there is nothing you have only locally). Please consult git help log for the details.

If you need only the names and the last commit you can simply use:

git branch -v

Probably you can mix these to fit your needs.

But my preferred choice is gitk --all, here's an example output:

enter image description here


This will show you all local branches.

git log --graph --oneline --branches

From git log --help

--branches[=<pattern>]
    Pretend as if all the refs in refs/heads are listed on the command line as <commit>.
    If <pattern> is given, limit branches to ones matching given shell glob.
    If pattern lacks ?, *, or [, /* at the end is implied.

So --branches is enough. I like to add --decorate and give the whole command a short alias.

Tags:

Git