Last active
December 19, 2015 06:59
-
-
Save tjmcewan/5915657 to your computer and use it in GitHub Desktop.
multi-stage deploy using git rebase -i
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
# x (or exec) will run anything on the same line as a shell command. | |
# we need to checkout a temporary branch because git won't push detached HEADs. | |
# after deploy, the "checkout -" means checkout the previously checked out thing, | |
# which will go back to our detached head and we clean up the temporary branch so | |
# that we don't need to worry about merging. | |
# if your branch is already based on the same point as your rebase command, then | |
# the 'pick' stage is essentially the same as a fast-forward merge; no new commits | |
# are created. | |
pick 0f85802 add missing timestamps | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 5f414c7 remove unused tables | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 8874c03 remove unused columns | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 6b770af delete orphaned records | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 0473a01 improve database schema | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 6d70686 update schema defaults | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick b076ece add immigrant gem | |
pick 4230e4c add foreign keys | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 8e64a2e add missing indexes | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp | |
pick 620f59d remove one-time scripts | |
pick 1182d4e update code & fix tests | |
x git checkout -b temp && git push && cap deploy && git checkout - && git branch -d temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@phantomwhale yerp. works alright. not sure if i'm actually going to do this though. I would recommend against it.