Skip to content

Commit

Permalink
git: reworked git aliases plus done alias and file search alias
Browse files Browse the repository at this point in the history
  • Loading branch information
durdn committed Dec 22, 2011
1 parent d854f8c commit 6c04e76
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
d = diff --word-diff
dc = diff --cached
branch = branch -ra
uiu = update-index --assume-unchanged
uin = update-index --no-assume-unchanged

r = reset
r1 = reset HEAD^
Expand All @@ -47,8 +45,22 @@
ss = stash save

cp = cherry-pick
grep = grep -I
gr = grep -I
grep = grep -Ii
gr = grep -Ii

#grep on filename
f = !git ls-files | grep -i

#rename branch tree to done-
done = "!f() { git branch | grep "$1" | cut -c 3- | grep -v done | xargs -I{} git branch -m {} done-{}; }; f"

#assume aliases
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
#show assumed files
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
#unassume all the assumed files
unassumeall = "git assumed | xargs git update-index --no-assume-unchanged"

[color]
branch = auto
Expand Down

0 comments on commit 6c04e76

Please sign in to comment.