Skip to content

Improve update template practices #165

Description

@mathiasbio

I'm bringing this up as a discussion point for refinement. I believe we have needless merge conflicts when updating the template branch. Caused by squashing and merging the update-template branch into dev, which does not perserve the git history from the TEMPLATE branch.

See discussion here: #161

Better summary from chatgpt:

Image

A solution could be to not squash and merge, which would add the template commits to dev. However, that could make the git history messy, especially since we haven't done it before. We would suddenly have several template commits in a row.

Another possible solution is to start cherry picking commits from the TEMPLATE branch to the update-template branch. That way we wouldn't need to handle the merge conflicts coming from old template commits.

We would do something like this:

git fetch origin

git checkout dev
git pull --ff-only origin dev

git checkout -b update-template-4.0.4

OLD_TEMPLATE_SHA=6d4fdfd
NEW_TEMPLATE_SHA=35aaae8

git log --oneline "$OLD_TEMPLATE_SHA..$NEW_TEMPLATE_SHA"
git cherry-pick "$OLD_TEMPLATE_SHA..$NEW_TEMPLATE_SHA"

Then we would solve merge conflicts that are only coming from the current template update. And we can keep doing squash merge like normal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs RefinementIssue needs to be better defined

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions