-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
51 lines (51 loc) · 2.03 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
[user]
name = Kevin Chen
useConfigOnly = true
[init]
defaultBranch = main
[push]
default = current
[commit]
gpgsign = true
[include]
path = ~/.gitconfig.aspin
[includeIf "gitdir:~/workspace/github.com/hrplp/"]
path = ~/.gitconfig.hrplp
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[alias]
co = checkout
br = branch
st = status
ci = commit
cp = cherry-pick
llog = log --graph --pretty=format:'%C(yellow)%h%Creset %C(bold blue)%an%Creset -%C(bold cyan)%d%Creset %s %C(green)(%cr)%Creset' --abbrev-commit --date=relative
lg = log --pretty=format:'%C(yellow)%h %C(green)%ar %C(bold blue)%an%Creset\n%s' --abbrev-commit --date=relative
dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
list-recent = for-each-ref --count=30 --sort=-committerdate refs/heads/ \
--format='%(color:yellow)%(committerdate:relative)%(color:reset)@%(authorname)@%(color:red bold)%(refname:lstrip=2)%(color:reset)@%(color:white dim)%(contents:subject)%(color:reset)'
recent = !git list-recent --color=always | column -s '@' -t
mine = !git list-recent --color=always | column -s '@' -t | grep --color=never 'Kevin Chen'
cop = "!f(){ git checkout \"$1\" && git pull; };f"
mup = "!f(){ BRANCH=$(git rev-parse --abbrev-ref HEAD) && git checkout \"$1\" && git pull && git checkout $BRANCH && git merge \"$1\"; };f"
rup = "!f(){ BRANCH=$(git rev-parse --abbrev-ref HEAD) && git checkout \"$1\" && git pull && git checkout $BRANCH && git rebase \"$1\"; };f"
[core]
editor = vim
autocrlf = input
excludesfile = /Users/aspin/.gitignore
[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
[checkout]
defaultRemote = origin
[pull]
rebase = true
[tag]
gpgSign = true
[url "ssh://[email protected]"]
insteadOf = https://github.com