Skip to content

Instantly share code, notes, and snippets.

@robrwo
Last active March 1, 2024 09:20
Show Gist options
  • Save robrwo/09283980eee09fd70b36cf83900c4642 to your computer and use it in GitHub Desktop.
Save robrwo/09283980eee09fd70b36cf83900c4642 to your computer and use it in GitHub Desktop.
Git configuration with useful aliases
[alias]
co = checkout
di = diff
st = status
sh = show
ci = commit
br = branch
cp = cherry-pick
last = show -1 HEAD
unstage = reset HEAD --
soft-reset = reset --soft HEAD~1
recommit = commit -c ORIG_HEAD
diverge = log --left-right --graph --cherry-pick --oneline
graph = log --all --graph --decorate --oneline
touch = !git commit --amend --date=\"$(date)\" --no-edit
brt = branch --sort=-committerdate
[core]
excludesfile = ~/.gitignore_global
[push]
default = matching
[init]
defaultBranch = main
[commit]
verbose = true
[fetch]
prune = true
prunetags = true
[diff]
colorMoved = default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment