From e693b517cfcca59f16cb811d370a7ef1c079e0e2 Mon Sep 17 00:00:00 2001 From: Hugo Posca Date: Fri, 19 Jan 2018 14:34:27 -0800 Subject: [PATCH] Add 'git branch hierarchy' alias on git plugin With this alias one can see the branches hierarchy of the repository without all the commit messages. Very useful when trying to discover which branch is the parent of another and/or if a branch was merged. * (local-branch-for-tests) * (origin/newer-stuff, newer-stuff) * (tag: before-merging) | * (origin/more-stuff) | | * (origin/new-stuff, new-stuff) | |/ | | * (origin/another-branch) | | | * (origin/master, origin/HEAD) | | |/ | | * | | |\ | |/ / | | * (update-documentation) | * | (HEAD -> master) | |/ | | * (refs/stash) | |/ |/| * | (pr-hints) |/ | * (tag: before-rebase) |/ * (old-local-branch) | * (branch5) |/ | * (branch4) |/ | * (branch3) |/ | * (origin/branch2, branch2) |/ | * (origin/branch1) |/ * --- plugins/git/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index fa0c06500..eb418144c 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -50,6 +50,7 @@ alias gb='git branch' alias gba='git branch -a' alias gbd='git branch -d' alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d' +alias gbh="git log --graph --simplify-by-decoration --pretty=format:'%d' --all" alias gbl='git blame -b -w' alias gbnm='git branch --no-merged' alias gbr='git branch --remote'