jhudsl / OTTR_Template

OTTR for making courses! This is a template repo that helps people write 1 course but publish it in three places
https://www.ottrproject.org/
Creative Commons Attribution 4.0 International
15 stars 12 forks source link

Rebase helps with render woes #756

Closed avahoffman closed 3 months ago

avahoffman commented 3 months ago

Problem

hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

example

Solution

I've found --rebase helps with this. But not sure if it's overkill. Welcome everyone's thoughts!

github-actions[bot] commented 3 months ago

No spelling errors! :tada: Comment updated at 2024-06-04-17:36:57 with changes from 370f48a5d9193536fd495a486046d2d310d7139e

github-actions[bot] commented 3 months ago

The broken url errors check is currently being re-run :runner: Comment updated at 2024-06-04-17:36:04 with changes from 370f48a5d9193536fd495a486046d2d310d7139e

github-actions[bot] commented 3 months ago

Re-rendered previews from the latest commit:

* note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea.

Updated at 2024-06-04 with changes from the latest commit 370f48a5d9193536fd495a486046d2d310d7139e

cansavvy commented 3 months ago

--rebase does feel like a lot. I'm not concerned about using it on the preview branch because it is a throw away branch, but have to think a bit more about using rebase with the main branch. Hmmm...

cansavvy commented 3 months ago

I think if it works I'd like to try a less drastic fix first which is what we implemented on Chris's Intro to R repo: https://github.com/fhdsl/Intro_to_R/pull/41

cansavvy commented 3 months ago

I think implementing to the preview branch we should definitely go ahead with! Thanks @avahoffman

But it needs to be added to ottr-reports to be effective. (this is why the URL checker is still failing) See this PR: https://github.com/jhudsl/ottr-reports/pull/36

avahoffman commented 3 months ago

Done!

cansavvy commented 3 months ago

I think we gotta do rebase. My other less drastic solutions aren't working. I think it should be fine though? It's only for the docs folder we will be doing this.

What I still don't understand is why this just came up as an issue and wasn't an issue previously. What's changed?

cansavvy commented 3 months ago

Okay I have one more try.

cansavvy commented 3 months ago

Never mind. Let's merge this.

avahoffman commented 3 months ago

@cansavvy I imagine one of the actions, perhaps checkout, has been updated or changed?

I actually think rebase might be appropriate (and not too aggressive) here, since all the changes executed by the rendering steps should always supersede any changes on main. Trying to think of a situation where it could be problematic.

cansavvy commented 3 months ago

@cansavvy I imagine one of the actions, perhaps checkout, has been updated or changed?

I actually think rebase might be appropriate (and not too aggressive) here, since all the changes executed by the rendering steps should always supersede any changes on main. Trying to think of a situation where it could be problematic.

Yeah I agree on all of this. I think you're right. Just was worried about moving to fast on something that maybe had potentially to be messy, but I think its good.