-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.gitconfig
More file actions
77 lines (77 loc) · 2.1 KB
/
.gitconfig
File metadata and controls
77 lines (77 loc) · 2.1 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
[include]
path = ~/.gitconfig.local
[core]
editor = vim
excludesfile = ~/.gitignore
pager = less -F -X
autocrlf = input
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[diff]
tool = vimdiff
[merge]
tool = vimdiff
log = true
[push]
default = simple
autoSetupRemote = true
[url "git@github.com:"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist:
[alias]
c = commit
co = checkout
ls = ls-files
s = status --untracked-files=no -s -b
#############
l = log --oneline --first-parent --abbrev-commit --decorate
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --all
lgo = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(bold)%C(magenta)(%an)%Creset' --abbrev-commit --date=relative --remotes=origin
lm = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --merges --first-parent
#############
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
#############
update = reset --hard @{u}
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
sign = commit -S --amend --no-edit
rmmerges = "!git branch --merged | grep -Ev '^( |\\*) (master|main|release|dev|develop)$' | xargs git branch -d"
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
[mergetool]
prompt = false
[rerere]
enabled = true
[pager]
branch = false
[gpg]
format = ssh
[init]
defaultBranch = main
[pull]
rebase = true
[fetch]
prune = true
[transfer]
fsckObjects = true
[receive]
fsckObjects = true
[submodule]
recurse = true
[branch]
autoSetupRebase = always