-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
54 lines (45 loc) · 1.85 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
[color]
ui = true
[user]
name = Joseph An
email = [email protected]
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[core]
editor = nvim
excludesfile = /Users/joseph/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[push]
default = simple
[pull]
rebase = true
[alias]
s = status -sb
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative --decorate
# list last commits
l = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ (%cr)\\ %Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# display file changes per commit
ls = log --pretty=format:\"%C(yellow)%h %Cgreen(%cr)%Creset %s %C(bold blue)[%cn]%Creset\" --name-status
lf = log ..@{u} --stat
# display all commits today
lt = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative
# grep commit messages
lgr = !sh -c 'git l --grep=$1 --max-count=20' - # search
pp = pull
rp = pull --rebase=true
f = fetch
pr = !hub pull-request -m
ci = !hub ci-status -v
view = !hub browse -- $(hub ci | grep "pull/.*$" -o)
cr = !hub browse -- pull/"$1"/files
pb = !git push -u origin $(git rev-parse --abbrev-ref HEAD)
sq = rebase -i origin/development
hotfix = !(git checkout -b $(echo "$1" | sed 's/ /-/g')) && git add -A && (echo "$1" | xargs -0 git commit -m) && git pb && git pr