-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
53 lines (53 loc) · 1.95 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
[core]
excludesfile = ~/.gitignore_global
fsmonitor = true
untrackedcache = true
[github]
user = timhwang21
[fetch]
prune = true ; remove stuff deleted on remote
[rebase]
autostash = true ; automatically stash before rebasing
autosquash = true ; automatically handle git commit --fixup/--squash
[push]
default = current ; if no upstream is set, use current branch name
[merge]
tool = vimdiff
conflictstyle = diff3
ff = only
[diff]
colorMoved = default
tool = vimdiff
conflictstyle = diff3
[difftool]
trustExitCode = true
prompt = false
[mergetool]
keepBackup = false ; block creation of unnecessarily persisted backups
trustExitCode = true
[mergetool "vimdiff"] ; use nvim vimdiff
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[alias]
currbranch = rev-parse --abbrev-ref HEAD
gud = !man git
authors = log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short --no-merges
commitcount = "!f() { git log --format=\"%ae\" --no-merges --author="$1" | wc -l; }; f"
amend = commit --amend --no-verify
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
; dependencies: fzf, fugitive-vim. $EDITOR being some flavor of vim
review = "!f() { BASE=$(git merge-base origin/master HEAD); $EDITOR -c \"tabdo Gdiff $BASE\" -p $(git diff --name-only $BASE | fzf); }; f"
getlastcommit = "!f() { git log -1 --pretty=%B | pbcopy; }; f"
wip = "!f() { git add -A && git commit -m 'WIP' --no-verify; }; f"
message = show -s --format=%s%n%n%b
pr = "!gh pr create --fill --label auto-assign-reviewers"
[user]
name = timhwang21
email = timhwang21@gmail.com
signingkey = 25AFC69C0A218D284E6ACD4F88561CCBE1B87D8E
[commit]
gpgsign = false
verbose = true ; git commit -v by default
[log]
follow = true ; default to log --follow
[url "git@github.com:"]
insteadOf = https://github.com/ ; default to SSH