aboutsummaryrefslogtreecommitdiffstats
path: root/.gitconfig
diff options
context:
space:
mode:
authorsolygen <frank.paczynski@solygen.de>2013-12-06 18:17:54 +0100
committerMathias Bynens <mathias@qiwi.be>2013-12-08 14:47:01 +0100
commit5cdfccf8f5ea35d90034ebca0dfd1e140bf580fc (patch)
treeb3d35d5cbf36b239f330cc099231ba28ee4ddd4b /.gitconfig
parente80bb561bc7ee6dc371d0ec9ebda0d71f7ba85ee (diff)
downloaddotfiles-5cdfccf8f5ea35d90034ebca0dfd1e140bf580fc.tar.gz
dotfiles-5cdfccf8f5ea35d90034ebca0dfd1e140bf580fc.tar.bz2
dotfiles-5cdfccf8f5ea35d90034ebca0dfd1e140bf580fc.zip
.gitconfig: Add aliases to find branches/tags/commits
Closes #304.
Diffstat (limited to '.gitconfig')
-rw-r--r--.gitconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/.gitconfig b/.gitconfig
index e72e4ea..f42caf1 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -23,6 +23,14 @@
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
+ # Find branches containing commit
+ fb = "!f() { git branch -a --contains $1; }; f"
+ # Find tags containing commit
+ ft = "!f() { git describe --always --contains $1; }; f"
+ # Find commits by source code
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
+ # Find commits by commit message
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
[apply]
# Detect whitespace errors when applying a patch