Skip to content

Instantly share code, notes, and snippets.

@robey
Forked from al3x/rbdiff.sh
Created December 18, 2008 06:20
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 robey/37412 to your computer and use it in GitHub Desktop.
Save robey/37412 to your computer and use it in GitHub Desktop.
function rbpatch {
local branch
branch=$(git name-rev --name-only head 2>/dev/null)
git diff ${1:-master}..head > "~/Desktop/${branch}-patch.txt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment