Skip to content

Instantly share code, notes, and snippets.

@calebcase
Last active September 6, 2018 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calebcase/7c50a96ff9f2cd96aab2b3f439f86461 to your computer and use it in GitHub Desktop.
Save calebcase/7c50a96ff9f2cd96aab2b3f439f86461 to your computer and use it in GitHub Desktop.
[alias]
# Checkout a pull request branch on an upstream project. It
# handles PRs that get rebased as well.
#
# git pr 3
pr = "!f() { git checkout master; git branch -D pr/$1 || true; git fetch origin refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
# Pull a rebasing branch on a fork. Useful for viewing someones
# rebasing feature branch from a clone of their fork.
pbr = "!f() { b=$(git rev-parse --abbrev-ref HEAD); git fetch origin $b && git reset --hard origin/$b; }; f"
# Really really clean checkout. Just shy of a completely fresh
# clone.
squeaky-clean = "!f() { git reset --hard && git clean -dxff; git submodule foreach git squeaky-clean; git submodule update --init --recursive; }; f"
[diff "blackbox"]
textconv = gpg2 --use-agent -q --batch --decrypt
[commit]
gpgsign = true
[gpg]
program = /usr/bin/gpg2
[url "git@github.com:"]
insteadOf = https://github.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment