Last active
December 2, 2015 15:19
-
-
Save benjaminxscott/6ec4c9a0232c470bca16 to your computer and use it in GitHub Desktop.
how to check out specific files from another branch, if those files have since moved
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
git clone $myrepo.git | |
# bring repo up to date | |
git checkout master | |
git pull | |
# change to PR branch | |
git checkout reorg_issues_dir | |
# move test out of the "new folder" created in PR | |
# since master doesn't know about the new folder | |
git mv $folder_with_changes . | |
# bring in our changes | |
git checkout master $folder_with_changes | |
# move them back to the "new folder" | |
git mv issue_* issues | |
# add changes to the PR | |
git commit issues/ -m "reflect latest tests" | |
# push to the PR | |
git push origin reorg_issues_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment