-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
94 lines (93 loc) · 3.25 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
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
[core]
name = JM
email = [email protected]
editor = /usr/bin/nvim
pager = diff-so-fancy | less --tabs=4 -RFX
hooksPath = /home/jm/.global-githooks
safecrlf = false
excludesfile = /home/jm/.gitignore
[user]
email = [email protected]
name = JM
[push]
default = simple
[interactive]
diffFilter = diff-so-fancy --patch
[alias]
conf = "!vim ~/.gitconfig"
h = help
st = status -bs
a = add
ap = add --patch
cp = cherry-pick
sw = switch
co = checkout
cop = checkout --patch
cob = checkout -b
sl = stash list
cm = commit
cmm = commit -m
cam = commit --amend
camo = commit --amend --no-edit
cf = commit -F- <<EOF
b = branch
d = diff
ds = diff --stat
dc = diff --cached
s = show
sb = show-branch
p = pull --ff-only
pu = push
puu = push -u origin
pub = "!git push -u origin $(git rev-parse --abbrev-ref HEAD)"
poof = push --force-with-lease
m = merge --ff-only
g = grep
f = fetch
reb = rebase
l = log
lp = log --patch --stat
lo = log --oneline
folo = log --patch --stat --follow
short= rev-parse --short
ll = log --date=short --pretty=format:' %C(bold blue)%cd %Creset %C(red)%h%Creset %C(auto)%d %Creset %C(normal)%s %Creset %C(bold blue)(%Creset %C(yellow)%an %Creset %C(bold blue)%cr)%Creset ' --color --graph --decorate
tags = log --tags --simplify-by-decoration --pretty='format:%ai %d'
recents = for-each-ref --sort=-committerdate refs/ --count=25 --format=' \n %(color:yellow)%(refname:short)%(color:reset) %(color:red)%(objectname:short)%(color:reset): (%(color:green)%(committerdate:relative)%(color:reset), %(authorname)) \n\t %(contents:subject) '
recent = "!git for-each-ref --count=25 --sort=-committerdate refs/remotes --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)'|column -nts'|'"
yesterday = "!find ~ -type d -name \\.git -execdir git log --all --author=$(git config user.name) --pretty=short --since=yesterday \\; 2>/dev/null"
dangling = "!for h in $(git fsck --no-reflog | awk '/dangling commit/ {print $3}') ; do git show --color=always --stat --patch $h ; done | less -RX"
sbum = "!git show-branch --colo=always $(git branch --no-merged=master) | less -RX"
ipatch = "!f() { git apply $1 --reject ; git add -p; }; f"
ignored = "!git check-ignore -v * | column -nt"
prune-force = "!git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done"
conflicts = diff --name-only --diff-filter=U
[gpg]
program = gpg2
gru = !git reset @{u} --hard
[log]
date = iso
abbrevCommit = true
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[commit]
verbose = true
[column]
status = dense
[branch]
sort = -committerdate
[rerere]
enabled = true
[init]
defaultBranch = main