Skip to content

Instantly share code, notes, and snippets.

@willgarcia
Created April 8, 2014 09:34
Show Gist options
  • Save willgarcia/d0031ee68f7d0f8b628a to your computer and use it in GitHub Desktop.
Save willgarcia/d0031ee68f7d0f8b628a to your computer and use it in GitHub Desktop.
migration a directory from a SRC repo to DEST repo
#!/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