-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
76 lines (65 loc) · 2.05 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[user]
name = George Jor
email = yhjor@me.com
[core]
ignorecase = false
pager = diff-so-fancy | less --tabs=4 -RFX
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 227
frag = magenta bold
commit = 227 bold
old = red bold
new = green bold
whitespace = red reverse
[branch]
autosetuprebase = always
autosetupmerge = always
[apply]
whitespace = fix
[push]
default = current
[merge]
tool = opendiff
[alias]
# Short alias
s = status --short
co = !sh -c \"git checkout $(git branch | fzf)\"
mt = mergetool
cp = cherry-pick
# Human alias
pop = stash pop
discard = checkout --
amend = commit --amend
uncommit = reset --mixed HEAD~
unstage = reset -q HEAD --
abort = rebase --abort
continue = rebase --continue
rename = branch -m
current = rev-parse --symbolic-full-name --abbrev-ref HEAD
logs = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
tracking = branch -vv
# Function alias
b = !sh -c \"git rev-parse --abbrev-ref HEAD | pbcopy\"
compare = !sh -c \"git fetch && git diff\"
recent = !sh -c \"git for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"\"
today = !sh -c \"git log --since=00:00:00 --all --no-merges --oneline\"
graph = !sh -c \"git log --graph --all --decorate --stat --date=iso\"
search = !sh -c \"git log --oneline | grep $1\"
checkout-origin = !sh -c \"git checkout -b $1 origin/$1\"
pull-latest = !sh -c \"git pull origin $(git rev-parse --abbrev-ref HEAD)\"
sync = !sh -c \"git pull-latest && git push origin\"
delete = !sh -c \"git branch -D $(git branch | fzf) && git branch\"
track = !sh -c \"git branch $(git current) --set-upstream-to origin/$1\"
clear-merged = !sh -c \"git branch --merged | grep -E 'feature/|fix/' | grep -v \\* | xargs -n 1 git branch -d\"
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f