-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitconfig
50 lines (50 loc) · 2.21 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[user]
name = Han Seoul-Oh
email = laughinghan@gmail.com
[merge]
conflictstyle = diff3
[diff]
REMOVE-ME-TO-ENABLE-external = /Users/Han/git-opendiff.sh
tool = Kaleidoscope
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX ; https://github.com/so-fancy/diff-so-fancy
[color]
ui = auto
[alias]
ci = commit -v
car = commit -v --amend --reset-author
st = status -sb
dc = diff --cached
co = checkout
pl = pull --ff-only --prune
ff = merge --ff-only
mg = merge --no-ff
purb = pull --rebase
br = branch -vv
l = log --graph --pretty=tformat:'%C(red)%h%C(reset) %s %>|(80)%C(cyan)%aN%C(reset) %C(yellow)%ad%C(reset) %C(green)(%cd)%C(reset)%C(bold white)%d%C(reset)' --date=relative
lt = log --graph --pretty=tformat:'%C(red)%h%C(reset) %s %>|(80)%C(cyan)%aN%C(reset) %C(yellow)%ar%C(reset) on %C(yellow)%ad%C(reset) %C(green)(%cr%C(reset) on %C(green)%cd)%C(reset)%C(bold white)%d%C(reset)' --date=rfc
lg = log --decorate --graph --date=relative --stat
lu = !cd \"$GIT_PREFIX\" && git l @{u}^! HEAD
rootgrep = !git grep ; since "shell commands will be executed from the top-level directory of a repository" - git help config
rootsgrep = !git sgrep
sgrep = !cd \"$GIT_PREFIX\" && { \n \
git --no-pager grep --color \"$@\" "# First, git-grep in current repo, without pager so all output can be concatenated before being paged.\n" \
git submodule foreach -q ' "# Then, recurse into submodules,\n" \
case \"$path\" in ../*) exit \n esac "# skipping those not in the current directory, and\n" \
git sgrep '\"$(printf '%q ' \"$@\")\"' | { "# (printf %q is a bash-ism, but necessary lest `git rootsgrep \"'test'\"` be equivalent to `git rootsgrep test`)\n" \
"# prefixing every line of grep output with the submodule path (http://unix.stackexchange.com/a/94166).\n" \
while IFS= read -r line \n do printf \"%s/%s\\n\" \"$path\" \"$line\" \n done \n \
} \n \
' \n \
} | less -FRSX "# Finally, page with git's default pager. Also, comment out arguments that are appended after this"
rebasec = rebase --continue
git = !cd \"$GIT_PREFIX\" && git
[rerere]
enabled = true
[difftool "Kaleidoscope"]
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[push]
default = upstream