From bafe8a2a692585fe992f43df54568af5b5933392 Mon Sep 17 00:00:00 2001 From: patrick nsukami Date: Fri, 30 Oct 2015 22:45:14 +0000 Subject: [PATCH] git parent branch alias --- .gitconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index d43b27f..70f5d5c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -10,6 +10,9 @@ [alias] aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' + current-branch = rev-parse --abbrev-ref HEAD + parent-branch = !"git show-branch -a | ack '\\*' | ack -v \"`git current-branch`\" | head -n1 | sed 's/.*\\[\\(.*\\)\\].*/\\1/' | sed 's/[\\^~].*//'" + pulled-changes = !git log -p -2 not-yet-pulled = !git log --name-status origin/master lastco = log -1 HEAD --numstat @@ -80,7 +83,7 @@ # how to pass params to git aliases my-alias1 = "!f(){ echo \"$@\"; }; f" # define a func, then call the func. my-alias2 = "! date " # call the cmd directly - + log-remote = "!git log HEAD..origin" [color] ui = always -- 2.17.1