Last active
March 29, 2025 10:01
-
-
Save gnprice/5f71b63464a76bd7e0480f207b1bbff3 to your computer and use it in GitHub Desktop.
gitconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a snapshot of my ~/.gitconfig file, minus a few bits | |
# that are obsolete or non-reusable. | |
# | |
# For explanation of each setting, see `git help config` | |
# or https://git-scm.com/docs/git-config . | |
# | |
[user] | |
name = Greg Price | |
email = gnprice@gmail.com | |
[alias] | |
st = status | |
di = diff | |
ls = ls-files | |
ci = commit | |
dc = diff --cached | |
rc = rebase --continue | |
ca = commit --amend | |
git = !git | |
testci = "!testci () { echo $1 >$1 && git add $1 && git commit -m $1; }; testci" | |
k = log --decorate --oneline --graph --boundary | |
pff = pull --ff-only | |
co = checkout | |
mff = merge --ff-only | |
refs = for-each-ref --format=%(refname) | |
kk = log --graph --boundary --pretty=format:'%Cred%h%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>' | |
s = status --short | |
view = log --decorate --oneline --graph --boundary --all HEAD | |
lv = log --decorate --oneline --graph --boundary --branches HEAD --not --tags --remotes=origin --remotes=upstream --not | |
lvm = log --decorate --oneline --graph --boundary --branches HEAD --remotes=me --not --tags --remotes=origin --remotes=upstream --not | |
rac = !git add -u && git rebase --continue | |
lsp = log --stat -p | |
usp = log --stat -p @{u}.. --reverse | |
uv = log --decorate --oneline --graph --boundary @{u}.. | |
rh = reset --hard | |
# Makes useful headings to paste into a GitHub review. | |
rv = "!f () { range=${1:-@{u\\}..}; git log --reverse --format='#### %h %s%n%n%n%n' \"$range\"; }; f" | |
[color] | |
ui = auto | |
[push] | |
default = current | |
[merge] | |
conflictstyle = diff3 | |
defaultToUpstream = true | |
[rebase] | |
stat = true | |
[core] | |
excludesfile = ~/.gitexclude | |
pager = LESS=-iRFX less | |
abbrev = 9 | |
commitgraph = true | |
# These require installing `diff-highlight` on your PATH. | |
#[pager] | |
# log = diff-highlight | LESS=-iRFX less | |
# show = diff-highlight | LESS=-iRFX less | |
# diff = diff-highlight | LESS=-iRFX less | |
#[interactive] | |
# diffFilter = diff-highlight | |
[rerere] | |
enabled = true | |
# These require having the respective programs installed on your PATH. | |
#[diff "ipynb"] | |
# textconv = jupyter nbconvert --to markdown --stdout --log-level=0 | |
# cachetextconv = true | |
#[diff "doc"] | |
# textconv = antiword | |
# cachetextconv = true | |
#[diff "odf"] | |
# textconv = odt2txt | |
# cachetextconv = true | |
[log] | |
mailmap = true | |
[format] | |
thread = shallow | |
[branch] | |
autosetupmerge = always | |
[pull] | |
rebase = true | |
[diff] | |
noprefix = true | |
colorMoved = zebra | |
[color "diff"] | |
# Style 1: bluish red/green, w/ faint gray background | |
# (defaults: bold magenta/cyan) | |
oldMoved = "#ff0077 #222222" | |
newMoved = "#00cc77 #222222" | |
# Style 2: yellowish red/green, w/ faint yellow-gray background | |
# (defaults: bold blue/yellow) | |
oldMovedAlternative = "#ff3322 #222a00" | |
newMovedAlternative = "#66aa00 #222a00" | |
[gc] | |
reflogExpire = never | |
reflogExpireUnreachable = never | |
writecommitgraph = true | |
[url "git@salsa.debian.org:"] | |
insteadOf = salsa: | |
[url "git@github.com:"] | |
insteadOf = gh: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment