Skip to content

Instantly share code, notes, and snippets.

@rvprasad
Last active August 1, 2025 22:15
Show Gist options
  • Save rvprasad/06dc6564a1d541dab7c47095205ffd26 to your computer and use it in GitHub Desktop.
Save rvprasad/06dc6564a1d541dab7c47095205ffd26 to your computer and use it in GitHub Desktop.
.gitconfig
[core]
excludesfile = <$HOME>/.gitignore_global
autocrlf = input
[credential]
helper = cache
[alias]
adN = add -N
adu = add -u
br = branch -v
bra = branch -va
brav = branch -vva
brv = branch -vv
ch = checkout
ce = cherry-pick
co = commit
coa = commit -a
di = diff
din = diff --name-only
dis = diff --staged
disn = diff --staged --name-only
diw = diff --color-words
diws = diff --staged --color-words
fe = fetch
hd = rev-parse HEAD
lo = log --name-status --graph
loo = log --oneline --tags
lop = log -p
los = log --stat --graph
me = merge
mem = merge main
pu = pull
ps = push
re = rebase
rem = rebase main
rs = restore
rss = restore --staged
sh = show
shq = show -q
so = shortlog
st = stash
sta = stash apply
stl = stash list --name-status
stp = stash pop
sa = status --show-stash
sw = switch
swb = switch -
swc = switch -c
swm = switch main
tal = tag -l --format \"%(objectname:short) %(creatordate:short) %(objecttype) %(refname)\"
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = blue
[color "status"]
added = yellow
changed = blue
untracked = cyan
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
dark = true
line-numbers = true
colorMoved = default
hyperlinks = true
hyperlinks-file-link-format = "file-line://{path}:{line}"
# git developers https://blog.gitbutler.com/how-git-core-devs-configure-git/
[column]
ui = auto
[branch]
sort = -committerdate
[tag]
sort = version:refname
sort = creatordate
gpgSign = true
[init]
defaultBranch = main
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[push]
default = simple
autoSetupRemote = true
followTags = true
[fetch]
prune = true
pruneTags = true
all = true
[help]
format = web
autocorrect = prompt
[commit]
verbose = true
gpgsign = true
[rerere]
enabled = true
autoupdate = true
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[merge]
conflictstyle = zdiff3
[pull]
ff = only
rebase = true
# Customization
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
#!/bin/bash
path=${1/file-line:\/\//}
tmp=(${path//:/ })
gvim "+set nu" ${tmp[0]} +${tmp[1]:-1}
[Desktop Entry]
Type=Application
Name=File-Line-Open
GenericName=Open a file at a certain position
Comment=Opens URLs of the type file-line://<path>[:<line>] in the configured editor and positions the cursor
Icon=text-editor
Exec=file-line-handler.sh %u
Categories=Utility;Core;
StartupNotify=false
MimeType=x-scheme-handler/file-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment