Created
October 6, 2017 20:49
-
-
Save pcreux/91960670786cbf34edb206fca9487f60 to your computer and use it in GitHub Desktop.
Extract all new migrations from the current branch over to a new branch (suffixed with "-migration")
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/sh | |
# Extract all new migrations from the current branch over to a new branch (suffixed with "-migration") | |
set -ev | |
export branch=`git rev-parse --abbrev-ref HEAD` | |
git checkout master | |
git pull | |
git checkout -b $branch-migration | |
git checkout $branch -- db engines/*/db | |
git commit -m "Extract migration from $branch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment