Skip to content

Instantly share code, notes, and snippets.

@x3rAx
Last active April 25, 2019 19:29
Show Gist options
  • Save x3rAx/3eb1d88b30cfc7f93d879789288307f5 to your computer and use it in GitHub Desktop.
Save x3rAx/3eb1d88b30cfc7f93d879789288307f5 to your computer and use it in GitHub Desktop.

Git Tree Alias

Register alias

$ git config --global alias.tree \
    'log --date=iso --graph --pretty="format:%C(yellow)%<(7)%h%C(reset)%x09%ad%C(reset)  %C(blue)%<(15)%an%C(reset)  %C(bold yellow)%d%C(reset) %C(green)%s%C(reset)"' \
    && git config --global alias.tree-all \
        'tree --exclude refs/stash --all'

Usage

Use it like git log but write:

$ git tree

or, to view all branches:

$ git tree-all

It takes the same arguments / options as git log does. (In fact, it is nothing more than a formatted git log).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment