Closed jd-foster closed 3 years ago
We addressed this in https://github.com/carpentries/styles/pull/555. Syncing your lesson with the styles repository should fix the problem.
Thanks Maxim. What's the best approach to this?
So once I've run
git remote add template https://github.com/carpentries/styles.git
what's the best way of merging the styles repository? I guess I'm asking what the git command(s) should be.
Is there a way to accept all incoming changes at once? Thanks for any help.
Edit: this was the best I could come up with
git merge template/gh-pages --allow-unrelated-histories --strategy-option=theirs --squash
Hi @jd-foster,
This is definitely one of the biggest pain points for the template. In the January maintainers meeting, we discussed tricks to use for working with the template and pull requests. I've added the recommendations to a flight rules document in the maintainers resources repository.
Your solution works and I like the use of --strategy-option=theirs
, but I would caution against using the --squash
flag because this forces the history of your lesson to diverge significantly from the template (the shared history of the build scripts is the method we use to update the styles).
That being said, the new template we are working on (still in pre-alpha, but nearly ready for alpha testing) will have auto-updating styles that will avoid problems like these.
carpentries/styles is an upstream repo for The Carpentries' lessons so their histories aren't (or, at least, shouldn't be) unrelated. The way I sync up lessons with the carpentries/styles repo is:
# once per repo
git remote add template https://github.com/carpentries/styles.git
git config --local remote.template.tagOpt --no-tags
git fetch template
git merge -m "Merge branch gh-pages of carpentries/styles" template/gh-pages
# fix conflicts, if any ~> git add ~> git merge --continue
Once this is done, I manually sync up files from bin/boilerplate with the ones in the root folder. Examples:
git add
+ git commit
.I don't use any flags to automate the merging process because (1) I never remember what Git considers 'theirs' and 'ours' and (2) sometimes changes in the lesson's gh-pages
branch are the ones I want to keep.
@jd-foster, I'm closing this issue, but please feel free to open a new one if you have any questions about the syncing process.
System: macOS 10.13 (High Sierra) Ruby: 3.00 (via Homebrew: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin17]) Jekyll: 3.9.0 (also applies to latest version 4.2.0)
I am getting an error after
make serve
following the instructions in Setup in sections "macOS" then "For Everyone". The full log is attached below. I've isolated the issue to the make commandbundle exec jekyll serve
, where there is arequire "webrick"
lineMy basic fix is to add the line
gem 'webrick'
into the Gemfile in the root of the lesson repository.This might have a connection to a recent Jekyll pull request that was merged into master on 11 Jan 2021 https://github.com/jekyll/jekyll/pull/8524