Skip to content

Instantly share code, notes, and snippets.

@jaredly
Last active September 22, 2016 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredly/da92ee88b8cde20caad5dbc7cece8231 to your computer and use it in GitHub Desktop.
Save jaredly/da92ee88b8cde20caad5dbc7cece8231 to your computer and use it in GitHub Desktop.
Git Tree commands

Here's part of my ~/.gitconfig.global

[user]
	name = Jared Forsyth
...
[alias]
    # View the tree!
    tree = log --oneline --decorate --all --graph
    tr = log --oneline --decorate --all --graph
    t = log --color --date-order --graph --oneline --decorate --simplify-by-decoration --branches
    ta = log --color --date-order --graph --oneline --decorate --simplify-by-decoration --all

    # other aliases that are so useful
    st = status
    s = status
    c = commit -v
    p = pull
    b = branch
    co = checkout
    su = submodule update --init --recursive
    mt = mergetool
    ld = log --decorate

g t is the short form: it only shows branches & tags (no intermediate commits) screen shot 2016-09-22 at 11 49 06 am

g tree (or g tr) is the long form -- it shows all the commits, with branches annotated screen shot 2016-09-22 at 11 49 47 am

g a is just like g t, but it also includes remote branches and stashes.

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