I have a blog based on a clone of the eleventy-base-blog
repo. When I cloned it, I left the original code untouched in the master
branch, and have made all my customisations and content changes in my own blog
branch (so I could easily start from scratch by making a new branch from pristine master
, if I made a mess of things).
Obviously I customise and make changes to my version, and over time it diverges from the upstream version, as well as from my local master
branch.
I recently realised that I might be missing important bug fixes, improvements and new features from upstream, so I looked into how I could update my fork so as to keep up to date.
The answer I found, after much searching and trying to get clarity from all the range of advice out there (1, 2, 3), seemed to be to use git rebase
, so I tried doing:
git checkout master
git pull upstream master
git checkout blog
git rebase master
(this suggests I should have done fetch && reset --hard
instead of pull
)
but this ended up with a load of merge conflicts that I had to painstakingly wade through and manually fix. It seemed like my whole commit history needed yet another round of editing followed by
git rebase --continue
or whatever (see scenario #1 here). I really don't want to have to do all that every time I want to get upstream updates. I didn't realise there would be so many conflicts.
So, what's a better way, if any, of getting a more seamless upgrade to the latest eleventy-base-blog
, without having to manually preserve all my own customisations and edits? I feel like I am missing something, and it would be good to know how to do this better. Then I can maybe contribute a good updating procedure to be included in the docs for eleventy-base-blog
.