-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
57 lines (57 loc) · 2.21 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
[core]
editor = nvim
pager = delta
autocrlf = false
# Speed up commands involving untracked files such as `git status`.
# https://git-scm.com/docs/git-update-index#_untracked_cache
untrackedCache = true
[include]
path = ~/themes.gitconfig
[delta]
navigate = true
line-numbers = true
side-by-side = true
features = villsau
[interactive]
diffFilter = delta --color-only
[alias]
lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(green)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:green)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
sw = switch
co = checkout
pf = push --force-with-lease
branch-name = "!git rev-parse --abbrev-ref HEAD"
po = "!git push -u origin $(git branch-name)"
ami = "!git add $(git ls-files --modified --exclude-standard | fzf -m)"
# Unstage any files that have been added to the staging area
unstage = reset HEAD
# Show changes that have been staged
diffs = diff --cached
# Mark a file as "assume unchanged", which means that Git will treat it
# as though there are no changes to it even if there are. Useful for
# temporary changes to tracked files
assume = update-index --assume-unchanged
# Reverse the above
unassume = update-index --no-assume-unchanged
# Show the files that are currently assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
gone = ! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"
[user]
name = Yevhen Badorov
[gpg]
program = gpg2
[submodule]
recurse = true
[rebase]
autoStash = true
[init]
defaultBranch = main
[rerere]
enabled = true
autoUpdate = true
[diff]
external = difft