How to merge upstream with your Jekyll-now repository
Written on January 16, 2015
Sometimes there are some updates on the upstream(original) Jekyll-now repository, and you want to apply those changes to your forked repository.
Here is how to do that:
0. Add remote url as upstream
$ git remote add upstream https://github.com/barryclark/jekyll-now.gitThen you can see the added url:
$ git remote -v
origin [email protected]:your-username/your-username.github.io.git (fetch)
origin [email protected]:your-username/your-username.github.io.git (push)
upstream https://github.com/barryclark/jekyll-now.git (fetch)
upstream https://github.com/barryclark/jekyll-now.git (push)
$ 1. Fetch upstream’s changes
$ git fetch upstream2. Merge upstream
If there’s any change, merge it to your repository.
$ git merge upstream/masterWhen you encounter conflicts, edit those files personally and add/commit them.
3. Push to Github
You made changes to your codes, so push them to Github.
$ git push origin masterThen check your pages after some minutes.
If there were too many changes on the upstream, it may break something, so I recommend you to test yourself before pushing.
Written on January 16, 2015