From bfa4d80970a1b0985c47cce9ee759aa4f48a55d9 Mon Sep 17 00:00:00 2001 From: Dominik Porada Date: Fri, 31 Aug 2012 16:19:11 +0300 Subject: .gitconfig: Tweak `diff` aliases --- .gitconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitconfig b/.gitconfig index 09e7dbe..4cb8777 100644 --- a/.gitconfig +++ b/.gitconfig @@ -4,7 +4,8 @@ # View the current working tree status using the short format s = status -s # Diff - d = diff --patch-with-stat + d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat" + di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" # Pull in remote changes for the current repository and all its submodules p = !"git pull; git submodule foreach git pull origin master" # Clone a repository including all submodules -- cgit v1.2.3