From 897ed16e6be349cef81b3e760af66838cbacf631 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 25 Aug 2011 11:45:17 -0700 Subject: [PATCH] Added `git-apply-branch` --- Readme.md | 11 +++++++++++ bin/git-apply-branch | 3 +++ 2 files changed, 14 insertions(+) create mode 100755 bin/git-apply-branch diff --git a/Readme.md b/Readme.md index ed277b2..5e1802f 100644 --- a/Readme.md +++ b/Readme.md @@ -26,6 +26,7 @@ Brew (buggy): - git pull-request - git count - git create-branch + - git apply-branch - git delete-branch - git delete-submodule - git delete-tag @@ -125,6 +126,16 @@ of commits included in the commitish: $ git summary v42.. +## git-apply-branch <name> + + Applies the diff of the given branch `name`: + + $ git apply-branch mybranch + + Effectively a shortcut for: + + $ git diff ..mybranch | git apply + ## git-repl GIT read-eval-print-loop: diff --git a/bin/git-apply-branch b/bin/git-apply-branch new file mode 100755 index 0000000..8b43b19 --- /dev/null +++ b/bin/git-apply-branch @@ -0,0 +1,3 @@ +#!/bin/sh + +git diff ..$1 | git apply \ No newline at end of file