-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig
More file actions
118 lines (83 loc) · 2.88 KB
/
dot_gitconfig
File metadata and controls
118 lines (83 loc) · 2.88 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
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
[alias]
m = commit -m \"$1\"
# View abbreviated SHA, description, and history graph of the latest 20 commits.
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format.
s = status -s
pu = push -u
# `git di $number` shows the diff between the state `$number` revisions ago and the current state.
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# Switch to a branch, creating it if necessary.
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch --all
remotes = remote --verbose
# Open an origin branch in a new worktree for review.
# Usage: git review <branch>
review = "!f() { b=\"$1\"; r=$(git rev-parse --show-toplevel); p=\"$r/../$(basename $r)-review-$b\"; git fetch origin \"$b\" && git worktree add -b \"review/$b\" \"$p\" \"origin/$b\" && code \"$p\"; }; f"
# List aliases.
aliases = config --get-regexp alias
# Amend the currently staged files to the latest commit.
amend = commit --amend --reuse-message=HEAD
# Remove branches that have already been merged with main.
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# List contributors with number of commits.
contributors = shortlog --summary --numbered
# Show the user email for the current repository.
whoami = config user.email
[user]
name = pansar1
email = 7646436+pansar1@users.noreply.github.com
[core]
excludesfile = /Users/adamoldin/.gitignore
# Use delta for better diffs
pager = delta
[interactive]
# Use delta for interactive commands (git add -p, etc.)
diffFilter = delta --color-only
[delta]
# Enable line numbers
line-numbers = true
# Navigate through diffs with n/N
navigate = true
# Dark mode theme
dark = true
# Syntax highlighting theme (Dracula is closest bundled theme to Catppuccin)
syntax-theme = Dracula
# Side-by-side view for large diffs
side-by-side = false
# Show file paths
file-style = "bold #f9e2af ul"
file-decoration-style = none
# Show line numbers with custom style
line-numbers-left-style = "#7f849c"
line-numbers-right-style = "#7f849c"
line-numbers-minus-style = "#f38ba8"
line-numbers-plus-style = "#a6e3a1"
[merge]
# Show common ancestor in merge conflicts
conflictstyle = diff3
[diff]
# Detect moved lines in diffs
colorMoved = default
[push]
default = current
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[color "status"]
added = yellow
changed = green
untracked = cyan