aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-09-01 19:21:23 +0200
committerMathias Bynens <mathias@qiwi.be>2012-09-01 19:23:37 +0200
commit6e58c9b16e1ae3e3969765cbe225662b52894666 (patch)
tree4a15bd8a72e2b12c078ab496c19482fcc633fd19
parentbfa4d80970a1b0985c47cce9ee759aa4f48a55d9 (diff)
downloaddotfiles-6e58c9b16e1ae3e3969765cbe225662b52894666.tar.gz
dotfiles-6e58c9b16e1ae3e3969765cbe225662b52894666.tar.bz2
dotfiles-6e58c9b16e1ae3e3969765cbe225662b52894666.zip
.gitconfig: Explain `diff`-related aliases
-rw-r--r--.gitconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitconfig b/.gitconfig
index 4cb8777..0b7c829 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -3,8 +3,9 @@
l = log --pretty=oneline -n 20 --graph
# View the current working tree status using the short format
s = status -s
- # Diff
+ # Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat"
+ # `git di $number` shows the diff between the state `$number` revisions ago and the current state
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"