-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
26 lines (25 loc) · 1.15 KB
/
gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[push]
default = simple
[color]
ui = auto
[alias]
co = checkout
br = branch
unstage = reset HEAD --
last = log -1 HEAD
ahead = log origin/master..HEAD --oneline
accept-ours = "!f() { git checkout --ours -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
accept-theirs = "!f() { git checkout --theirs -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
stash-and-pull = "!f() { git stash; git fetch origin master; git rebase origin/master; git stash pop; }; f"
s = status
st = status
dc = diff --cached
rebase-feature = "!f() { git rebase -i `git merge-base --octopus master`; }; f"
show-tag = !sh -c 'git rev-parse $1 | xargs git cat-file -p' -
times = "!git log --author=\"$(git config user.name)\" --date=iso | perl -nalE 'if (/^Date:\\s+[\\d-]{10}\\s(\\d{2})/) { say $1+0 }' | sort | uniq -c | perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf \"%02d - %4d %s\", $_, $h{$_}, \"*\"x ($h{$_} / $m * 50); }'"
[core]
excludesfile = ~/.gitignore_global
[include]
path = ~/.dotfiles/local/gitconfig_local
[init]
defaultBranch = master