Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Extract all new migrations from the current branch over to a new branch (suffixed with "-migration")
#!/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
You can’t perform that action at this time.