Created
April 8, 2014 09:34
-
-
Save willgarcia/d0031ee68f7d0f8b628a to your computer and use it in GitHub Desktop.
migration a directory from a SRC repo to DEST repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SRC_REPO=[URL SRC] | |
SRC_DIR=tests | |
OUTPUT_REPO=[URL DEST] | |
TMP_DIR=$(mktemp -d) | |
git clone $SRC_REPO $TMP_DIR; | |
git filter-branch --prune-empty --subdirectory-filter $SRC_DIR master | |
git push $OUTPUT_REPO master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment