Skip to content

Instantly share code, notes, and snippets.

@sethvargo
Last active October 26, 2022 20:03
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sethvargo/d10a81f219f6469889269af2076b4d39 to your computer and use it in GitHub Desktop.
Save sethvargo/d10a81f219f6469889269af2076b4d39 to your computer and use it in GitHub Desktop.
[alias]
pr = "!f() { git fetch origin pull/$1/head:sethvargo/pr-$1 && git checkout sethvargo/pr-$1; }; f"
unreleased = "!f() { git fetch --tags && git diff $(git tag | tail -n 1); }; f"
up = "!f() { git fetch --all; git pull origin HEAD; for upstream in $(git remote); do git remote prune "${upstream}"; done }; f"
graph = "!f() { git log --oneline --abbrev-commit --graph --decorate; }; f"
undo = !git reset HEAD~1 --mixed
amend = !git commit --amend --no-edit
top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20
x = "!f() { gitx; }; f"
[apply]
whitespace = fix
[branch]
autosetuprebase = always
[color]
ui = true
diff = true
status = true
branch = true
interactive = true
[commit]
gpgsign = true
[core]
editor = $EDITOR
excludesfile = ~/.gitignore
whitespace = fix
trustctime = false
[diff]
compactionHeuristic = true
[format]
pretty = %C(bold yellow)%h%Creset %s %C(bold blue)[%aN]%Creset %Cblue{%aE}%Creset %Cgreen(%cr)%Creset
[help]
autocorrect = 5
[http]
cookiefile = ~/.gitcookies
[init]
defaultBranch = main
[mailmap]
file = ~/.gitmailmap
[pull]
rebase = merges
default = current
[push]
default = current
[submodule]
fetchJobs = "7"
[user]
name = Seth Vargo
email = seth@sethvargo.com
signingkey = C921994F9C27E0FF
[include]
path = ~/.gitconfig.inc
[credential]
helper = osxkeychain
[gpg]
program = /usr/local/bin/gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment