-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
_gitconfig
102 lines (101 loc) · 2.8 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
# vi: ft=gitconfig
# Include this in your ~/.gitconfig via
# [include]
# path = <path to this _gitconfig file>
[branch]
autosetuprebase = always
[commit]
gpgsign = true
[core]
editor = vim
pager = delta
# Treat spaces before tabs, lines that are indented with 8 or more spaces, and all kinds of trailing whitespace as an error
whitespace = space-before-tab,indent-with-non-tab,trailing-space
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
# features = collared-trogon
syntax-theme = Solarized (dark)
line-numbers = true
decorations = true
# side-by-side = true
[user]
name = Ashish Bhatia
email = [email protected]
[diff]
algorithm = histogram
mnemonicprefix = true
tool = diffmerge
noprefix = true
colorMoved = default
[difftool "diffmerge"]
cmd = /usr/local/bin/diffmerge \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
tool = p4mergetool
conflictstyle = diff3
[mergetool "p4mergetool"]
cmd = /opt/homebrew-cask/Caskroom/p4merge/2014.1/p4merge.app/Contents/Resources/launchp4merge $PWD/$BASE $PWD/$REMOTE $PWD/$LOCAL $PWD/$MERGED
trustExitCode = false
[mergetool]
keepBackup = false
[grep]
extendRegexp = true
lineNumber = true
[push]
default = simple
autoSetupRemote = true
followtags = true
[pull]
conflictstyle = diff3
rebase = true
[alias]
st = status
ci = commit
cip = !git commit --amend && git push -f
br = branch
co = checkout
# Checks out the default branch - master or main
com = !git checkout $(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
df = diff --color-words --word-diff-regex=.
lg = log -p
hist = log -20 --pretty=format:"%C(yellow)%h%Creset\\%C(green)%ar%C(cyan)%d\\ %Creset%s%C(yellow)\\ [%cn]" --graph --decorate --all
# Pull the default branch - master or main
pom = !git pull origin $(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
spp = !git stash && git pom && git stash pop
recentbranches = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)'
[color]
ui = auto
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow black
local = yellow
remote = magenta
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red reverse
new = green reverse
whitespace = white reverse
[color "status"]
added = yellow
changed = green
untracked = cyan reverse
branch = magenta
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
prune = true
prunetags = true
[receive]
fsckObjects = true
[url "[email protected]:"]
insteadOf = https://github.com/