Created
September 28, 2012 16:55
-
-
Save chrismo/3800936 to your computer and use it in GitHub Desktop.
Non-merging copying over of changes from branch to branch
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
| If file exists in both places: | |
| git diff target_branch source_branch relative_path_to_file | git apply | |
| If file is new on other branch: | |
| git checkout source_branch relative_path_to_file | |
| The checkout will work even if the file exists, and will stomp it, | |
| not diff into it, so be careful. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment