-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
63 lines (54 loc) · 1.97 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
[user]
name = Mika Vilpas
email = [email protected]
[core]
editor = nvim
pager = delta
; commentChar = ";"
[diff]
colorMoved = default
[interactive]
diffFilter = delta --color-only --features=interactive
[include]
path = ~/dotfiles/.config/lazygit/delta-colors.gitconfig
[delta]
features = decorations
features = catppuccin-macchiato
tabs = 4
side-by-side = true
line-numbers-left-format = ""
line-numbers-right-format = "│ "
[delta "interactive"]
keep-plus-minus-markers = false
[delta "decorations"]
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = "#067a00"
hunk-header-style = file line-number syntax
[rerere]
enabled = true
[rebase]
; https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/
;
; So You Think You Know Git Part 2 - DevWorld 2024
; https://youtu.be/Md44rcw13k4?t=1077
updateRefs = true
[alias]
; https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
lg1 = 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(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg = lg1
; How to stash changes while keeping the changes in the working directory? (Git)
; https://stackoverflow.com/a/60557208/1336788
stash-keep = "!f() { git stash store --message \"$(date +'%Y-%m-%d %H:%M:%S')\" \"$1\"; }; f $(git stash create)"
; quickly create a backup of the current branch
backup-branch = !git branch $(git rev-parse --abbrev-ref HEAD)--backup-$(date +%Y%m%d%H%M%S)
[commit]
verbose = true
[init]
defaultBranch = main
[push]
default = upstream