I keep having problems with trying to sync my Marlin repo (forked from luc's) to his fork. It is usually a tedious process for me to fetch from upstream, then merge, and end up having a ton of conflicts that I need to manually resolve.
Then, I found the easy way here. I am just going to cut and paste the entire set of instructions just to help me in case I forget.
- Open your fork of the repository.
- Click the compare button.This will open a page titled Comparing Changes and if you look carefully you'll have jumped to the upstream version of the repository. If you were to do a regular pull request then this makes sense as you'd be bringing your changes into the upstream version. But in this case we want to flip the direction and pull changes from the original version to our fork.
- Change the base fork to your repository
- Change the head fork to the upstream (original) repositoryNote at this point that if you were in control of everything at GitHub you would probably just have put a little button in between the base for and head fork that would have flipped them for you rather than doing all these clicks. You might even had added in a separate button to check for upstream changes! But they do know that this is a bit of a silly hack and they're working hard on a bunch of other cool stuff so we'll let them off this one.
- You'll see one of two options:
- "There isn’t anything to compare" This means you're up to date and you don't have to do anything. Phew.
- A list of commits. These are the changes that have happened in the repository since you forked your version. Go to step 7.
- Create a pull requestNote that this pull request is to you! So you can confirm that it's ok and merge it when necessary. And if there are any merge conflicts then it's up to you to figure out what's gone wrong and sort them out.
After that, to update any local files on disk, I just need to go to the respective folders on my hard disk, and do a git pull.
No comments:
Post a Comment