Skip to content

Instantly share code, notes, and snippets.

@avalanchy
Last active September 9, 2019 05:25
Show Gist options
  • Save avalanchy/7803501 to your computer and use it in GitHub Desktop.
Save avalanchy/7803501 to your computer and use it in GitHub Desktop.
~/.gitconfig
[user]
email = yourname@example.com
name = Joe Smith
[alias]
d = diff HEAD
dn = diff --name-only
co = checkout
b = branch
ci = commit
st = status
this = symbolic-ref HEAD
cp = cherry-pick
pushf = push --force-with-lease
f = !sh -c 'git fetch origin $1:$1' -
fc = !sh -c 'git fetch origin $1:$1 && git checkout $1' -
fct = !sh -c 'git fetch origin $1:test-$1 && git checkout test-$1' -
rmb = !sh -c 'git b --merged | xargs git b -d'
pullf = !sh -c 'git fetch && git reset --hard origin/$(git b --show-current)'
[color]
diff = auto
branch = auto
status = auto
ui = auto
[push]
default = current
[core]
excludesfile = ~/.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment