Skip to content
Browse files

Add git-import-filesystem-local-branch-into-subdirectory

  • Loading branch information...
1 parent 1865c0d commit 7f790dde297813c9e5e7f552abab060fc462393b @MaxNanasy committed Feb 15, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 git-import-filesystem-local-branch-into-subdirectory
View
9 git-import-filesystem-local-branch-into-subdirectory
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ "$#" -ne 3 ]; then
+ echo "Usage: git import-filesystem-local-branch-into-subdirectory <filesystem-local remote repository> <subdirectory> (<since> | <revision range>)"
+ echo "Example: git import-filesystem-local-branch-into-subdirectory /src/repository subdirectory master..branch"
+ exit
+fi
+
+(cd "$1" && git format-patch --stdout --no-renames --src-prefix="a/$2/" --dst-prefix="b/$2/" "$3") | git am

0 comments on commit 7f790dd

Please sign in to comment.
Something went wrong with that request. Please try again.