Skip to content

Commit

Permalink
.gitconfig: Add aliases to find branches/tags/commits
Browse files Browse the repository at this point in the history
  • Loading branch information
solygen authored and mathiasbynens committed Dec 8, 2013
1 parent e80bb56 commit 5cdfccf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cdfccf

Please sign in to comment.