Created
September 13, 2018 04:11
-
-
Save thamht4190/8fcc446d4cf328f4952a07aa48335fa5 to your computer and use it in GitHub Desktop.
Github move a patch to a PR
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
| I have to move a PR from this repo to another repo with slight difference in structure. That was how I did: | |
| 1. Go to github page of the PR, add .patch to url to get the patch file | |
| E.g: http://github.com/<name>/<repo>/pull/<id>.patch | |
| 2. Download as <id>.patch then open that file, edit changed file path (in old repo) to new file path (in new repo). | |
| You don't need to do this step if 2 repos have the same structure. | |
| 3. git am -3 <id>.patch | |
| the -3 will do a three-way merge if there are conflicts. | |
| At this point you can do a git mergetool if you want to go to a gui or just manually merge the files using vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment