-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
.gitconfig
130 lines (117 loc) · 3.54 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
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
[color]
ui = auto
[color "diff"]
meta = blue
frag = white
old = red bold
new = green bold
[core]
editor = cot --wait
pager = delta
autocrlf = false
safecrlf = false
mergeoptions = --no-edit
excludesfile = ~/.gitignore
quotepath = false
# Enable parallel index preload for operations like git diff
preloadindex = true
[alias]
# Add (stage) file
a = add
# Unadd (unstage) file
ua = reset HEAD
# Checkout
co = checkout
# Status
s = status -sb
# Diff
d = diff
# Cherry pick
cp = cherry-pick
# Sharable diff with disabled syntax highlighting and +/- marks
patch = !git --no-pager diff --no-color
# Merge fresh master into the current branch
mmm = !git fetch origin master && git merge origin/master --no-edit
mmn = !git fetch origin main && git merge origin/main --no-edit
# Compact and readable log
l = log --graph --pretty=format:'%C(magenta)%h%C(blue)%d%Creset %s %C(blue bold)- %an, %ar%Creset'
# Log with list of changed files for each commit
ll = log --stat --abbrev-commit
# List of my own commits
my = !git log --branches=* --no-merges --pretty=format:'%C(reset)%C(bold)%cd %C(reset)%C(white)%s %C(reset)%h' --date=short --author=\"$(git config user.name)\"
# List of branches ordered by last change
branches = for-each-ref --sort=-committerdate refs/heads/ --format='%(color:bold)%(refname:short)%(color:reset)\t%(committerdate:relative)'
# List of files with merge conflicts
wtf = diff --name-only --diff-filter=U
# Rebase: add changes and continue
cont = !git add . && git rebase --continue
# Rebase: skip a rebase step
skip = rebase --skip
# Rebase: abort
abort = rebase --abort
# Cancel local commits in the branch: git fuck master
fuck = "!f() { git reset --hard origin/$1; }; f"
# Remove all changes, including untracked files
nuke = !git reset --hard && git clean -f -d
# Add all modified files to the latest commit
append = commit -a --amend --no-edit
[pull]
# Don't rebase on pulling: annoying, especially in VS Code
rebase = false
[push]
# When pushing code, always push only your current branch to a branch of the same name
default = current
# Automatically set up upstream tracking
autoSetupRemote = true
[fetch]
# Automatically prune deleted branches from your local copy when you fetch (or pull)
prune = true
[log]
# Show branch names with git log
decorate = short
# Any GitHub repo with my username should be checked out read/write by default
# http://rentzsch.tumblr.com/post/564806957/public-but-hackable-git-submodules
[url "git@github.com:sapegin/"]
insteadOf = "git://github.com/sapegin/"
# git-delta
[interactive]
diffFilter = delta --color-only
[add.interactive]
useBuiltin = false
[delta]
navigate = false
light = false
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
grep-line-number-style = normal dim
grep-file-style = blue bold
grep-match-line-style = normal "#453327" # gray04
grep-match-word-style = black yellow
grep-separator-symbol = " "
[merge]
conflictstyle = merge
[diff]
colorMoved = default
# Default values for new repositories
[init]
defaultBranch = main
[user]
name = Artem Sapegin
email = artem@sapegin.ru
# Include local settings
[include]
path = .gitlocal
# Some random bullshit that always appers at the end of the config file
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true