Created
February 22, 2018 22:44
-
-
Save duncanjbrown/ecc3c67a5e4f551dc89e1fe272142864 to your computer and use it in GitHub Desktop.
Move commits from one repo to another using git
This file contains 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
# I was moving a vanilla WP site to Bedrock but wanted to start | |
# working in Bedrock sooner, so I needed to backport commits | |
# from Bedrock to the old repo. Bedrock uses a different folder structure, so | |
# whereas my commits were in in web/app/themes/mytheme, the old | |
# repo needed changes in wp-content/themes/mytheme. | |
# In Bedrock | |
cd web/app/themes/mytheme | |
git format-patch --relative <commit-hash-at-branch-base> --stdout > ~/patches-from-bedrock | |
# In root of old site | |
git am --directory wp-content/themes/cocoarunners-light ~/patches-from-bedrock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment