-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
executable file
·136 lines (118 loc) · 3.45 KB
/
.gitconfig
File metadata and controls
executable file
·136 lines (118 loc) · 3.45 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[user]
email = eallion.s+github@gmail.com
name = Charles Chin
signingkey = 327C873BCB0A151F1A599A3CE685DDDDDDDDDDDD
[credential]
helper = manager
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[commit]
gpgsign = true
[core]
quotepath = false
editor = "vim -f -u NONE -i NONE -N"
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
untrackedCache = true
precomposeunicode = false
autocrlf = input
compression = 1
[tag]
forcesignannotated = true
[push]
default = simple
followTags = true
[pull]
rebase = true
[branch]
sort = -committerdate
autosetuprebase = always
[alias]
gl = log --graph --pretty="\""%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset"\"" --abbrev-commit
gr = log --color=always --all --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset'
gs = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
gw = log --no-merges --raw --since='4 weeks ago'
fl = log --follow -p --
rl = shortlog --no-merges --format='%Cgreen%h%Creset %s'
# Switch to a branch, creating it if necessary.
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
merge = merge --no-ff
up = merge --ff-only
# Clone a repository including all submodules.
c = clone --recursive
clone = clone --recursive
cs = commit -s
csm = commit -s -m
# Commit all changes.
ca = !git add -A && git commit -av
co = checkout
ci = commit -s
st = status
stat = status
br = branch -v
fo = fetch origin
fu = fetch upstream
po = push origin
pu = pull --rebase origin main
sync = fetch --prune
patch = --no-pager diff --no-color
unstage = reset HEAD
uncommit = reset --soft HEAD^
amend = commit --amend
who = shortlog -n -s --no-merges
whoami = config user.email
g = grep -n --color -E
cp = cherry-pick -x
# Handy shortcuts for rebasing
rc = rebase --continue
rs = rebase --skip
ra = rebase --abort
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# List contributors with number of commits
contributors = shortlog --summary --numbered
# diff-so-fancy (仅在安装时可用)
df = "!f() { if command -v diff-so-fancy >/dev/null 2>&1; then [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; else git diff \"$@\"; fi; }; f"
# Add list all git aliases
la = !git config -l | grep alias | sed s/^alias\\.//g
aliases = config --get-regexp alias
[color]
ui = always
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[http]
postBuffer = 157286400
[pack]
window = 1
[init]
defaultBranch = main
[diff]
tool = vimdiff
[difftool "vimdiff"]
cmd = vim -d $LOCAL $REMOTE
[merge]
tool = vimdiff
[mergetool "vimdiff"]
cmd = vim -d $MERGED $LOCAL $BASE $REMOTE