-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgitconfig
69 lines (54 loc) · 1.96 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
[user]
# Do not guess the user's identity.
# https://github.com/git/git/blob/90f7b16b3adc78d4bbabbd426fb69aa78c714f71/Documentation/config.txt#L2847-L2855
useConfigOnly = true
# [!] DO NOT store sensitive information such as the Git user
# credentials (`name` / `email`), or things such as the `signingkey`
# in this file, add them in `~/.gitconfig.local`!
[credential]
helper = osxkeychain
[diff]
tool = ksdiff
[difftool "ksdiff"]
cmd = ksdiff \"$LOCAL\" \"$REMOTE\"
[core]
excludesfile = ~/.gitignore_global
autosetuprebase = always
# npm install -g git-split-diffs
pager = git-split-diffs --color | less -RFX
editor = nvim
[color]
ui = auto
[alias]
st = status
br = branch
co = checkout
df = diff
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lgm = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --branches master
who = shortlog -s --
dft = difftool -y
committers = shortlog --summary --email --committer -n
last-commit = !sh -c 'git rev-list HEAD --abbrev-commit | head -1'
current-branch = !sh -c 'git branch | grep \\* | sed "s/^*\\ //g"'
update = !sh -c 'git fetch --prune && git rebase --autostash origin/`git current-branch`'
oh-my-god = !sh -c 'git fsck --lost-found | grep "dangling commit" | cut -d " " -f 3 | xargs git log --oneline --no-walk -p'
[push]
default = simple
autoSetupRemote = true
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[commit]
gpgsign = true
[init]
defaultBranch = main
[include]
# Load local configs.
# https://git-scm.com/docs/git-config#_includes
#
# [!] The following needs to remain at the end of this file in
# order to allow any of the above configs to be overwritten
# by the local ones
path = ~/.gitconfig.local