Skip to content

Instantly share code, notes, and snippets.

@adamralph
Last active April 22, 2025 14:26
Show Gist options
  • Save adamralph/5890895 to your computer and use it in GitHub Desktop.
Save adamralph/5890895 to your computer and use it in GitHub Desktop.
My global .gitconfig
[user]
name = Adam Ralph
email = [email protected]
[core]
autocrlf = false
excludesfile = /Users/adam/.gitignore_global
[alias]
dtag = !git tag -l | xargs git tag -d
prune-all = !git remote | xargs -n 1 git remote prune
tup = !git dtag && git fetch origin --tags
utup = !git dtag && git fetch upstream --tags
up = !git checkout $1 && git dtag && git fetch origin && git merge --ff-only origin/$1 && git remote update && git prune-all && git branch --merged $1 | grep -v -e main -e master -e develop -e dev -e $1 | xargs -r git branch -d
mup = !git checkout main && git dtag && git fetch origin && git merge --ff-only origin/main && git remote update && git prune-all && git branch --merged main | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
rup = !git checkout master && git dtag && git fetch origin && git merge --ff-only origin/master && git remote update && git prune-all && git branch --merged master | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
gup = !git checkout gh-pages && git dtag && git fetch origin && git merge --ff-only origin/gh-pages && git remote update && git prune-all && git branch --merged gh-pages | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
uup = !git checkout $1 && git dtag && git fetch upstream && git merge --ff-only upstream/$1 && git push origin $1 -f --tags && git remote update && git prune-all && git branch --merged $1 | grep -v -e main -e master -e develop -e dev -e $1 | xargs -r git branch -d
umup = !git checkout main && git dtag && git fetch upstream && git merge --ff-only upstream/main && git push origin main -f --tags && git remote update && git prune-all && git branch --merged main | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
urup = !git checkout master && git dtag && git fetch upstream && git merge --ff-only upstream/master && git push origin master -f --tags && git remote update && git prune-all && git branch --merged master | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
ugup = !git checkout gh-pages && git dtag && git fetch upstream && git merge --ff-only upstream/gh-pages && git push origin gh-pages -f --tags && git remote update && git prune-all && git branch --merged gh-pages | grep -v -e main -e master -e develop -e dev | xargs -r git branch -d
[difftool]
prompt = false
keepBackup = false
[mergetool]
prompt = false
keepBackup = false
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Users/adam/Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[commit]
template = /Users/adam/.stCommitMsg
gpgsign = true
[pull]
rebase = false
[fetch]
prune = false
[rebase]
autoStash = false
@adamralph
Copy link
Author

curl -OutFile C:/Users/Adam/.gitconfig https://gist.githubusercontent.com/adamralph/5890895/raw/.gitconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment