Skip to content

Instantly share code, notes, and snippets.

@drew887
Last active December 22, 2021 19:39
Show Gist options
  • Save drew887/ca495bb8f71825a5b41a9d25ae154420 to your computer and use it in GitHub Desktop.
Save drew887/ca495bb8f71825a5b41a9d25ae154420 to your computer and use it in GitHub Desktop.
Just the common parts of my gitconfig so I can copy them to a new machine
[alias]
tr = log --oneline --graph --decorate
trf = log --oneline --graph --decorate --first-parent
trs = log --oneline --graph --decorate --show-signature
tra = log --oneline --graph --all --decorate
traf = log --oneline --graph --all --decorate --first-parent
tras = log --oneline --graph --all --decorate --show-signature
br = branch
brr = branch -r
st = status
ch = checkout
chm = checkout main
chd = checkout dev
cherx = cherry-pick -x
clf = clean -f
cm = commit -a -S
cma = commit -a --amend -S
cman = commit -a --amend --no-edit -S
cmand = commit -a --amend --no-edit --date=now -S
df = diff
dfc = diff --cached
dfch = diff --check
dfn = diff --name-only
dfni = diff --no-index
editg = config -e --global
edit = config -e
ftp = fetch --prune
fta = fetch --all
ftra = !git fta && git tra
mrgt = mergetool
shtlog = shortlog -s -n --all
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rhh = reset HEAD --hard
rh = reset --hard
sh = show --show-signature
shf = show --name-only
shn = show --name-only
shsta = show stash@{0}
sta = stash
staa = stash apply
stal = stash list
stap = stash pop
stad = stash drop
sw = switch
[core]
editor = "emacsclient -nw"
pager = diff-so-fancy | less --tabs=4 -RFX
[fetch]
prune = true
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
#Uncomment if using sops encoded secrets
#[diff "sopsdiffer"]
# textconv = sops -d
[pull]
rebase = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment