We've moved discussions to Discord

Merge Conflicts in 69 untouched Jumpstart files when pulling in latest from master

I have a recent JSP project (early Dec) and I'm trying to merge jumpstart master to pull in Rails7 changes. This results in major sadness of 69 merge conflicts :( 

Wondering if anyone else has run into this :)

I did
git remote add jumpstart git@github.com:jumpstart-pro/jumpstart-pro.git
then
git fetch jumpstart
git merge jumpstart/master --allow-unrelated-histories
Merge fails with conflict in all kinds of files that I have not touched (I counted 69). Here is the last bit of the output:

CONFLICT (add/add): Merge conflict in app/assets/stylesheets/components/buttons.css
Auto-merging app/assets/stylesheets/components/buttons.css
CONFLICT (add/add): Merge conflict in README.md
Auto-merging README.md
CONFLICT (add/add): Merge conflict in Procfile.dev
Auto-merging Procfile.dev
CONFLICT (add/add): Merge conflict in Gemfile.lock
Auto-merging Gemfile.lock
CONFLICT (add/add): Merge conflict in Gemfile
Auto-merging Gemfile
CONFLICT (add/add): Merge conflict in .ruby-version
Auto-merging .ruby-version
CONFLICT (add/add): Merge conflict in .gitignore
Auto-merging .gitignore
CONFLICT (add/add): Merge conflict in .github/workflows/ci.yml
Auto-merging .github/workflows/ci.yml
Automatic merge failed; fix conflicts and then commit the result.
Matthias Orgler
You will certainly get merge conflicts when pulling in the latest upstream jumpstart. That is expected. Event if you didn't modify any classes explicitly, simply configuring your JSP app will modify files. Fortunately the merge conflicts should be easy to resolve.

Even for a fresh JSP app I also get merge conflicts on typical files like database.yml (changed the DB name) or .gitignore (adding /vendor after running bundle install).
Thanks for the reply Matthias Orgler !

That makes sense (about database.yml and such). I was surprised at the sheer number. Most of them are one or two lines but there were a couple gnarly ones. I worked around this and didn't end up spending the hour to manually resolve. We'll see how I fare in the future. This was straddling the Rails 7 update as well so maybe that added to it.

wondering out loud, for those who have long running projects on JSP how often do they merge if much or mostly cherry-pick..hm.
We're trying to merge quite often, at least once / month. Still keeping an eye on new commits as often as every week, just to anticipate the merge conflicts.

Also, check your git merge settings, you might want to check if you use the newest "ort" merge strategy (which is default since 2.33 - https://github.blog/2021-08-16-highlights-from-git-2-33/#merge-ort-a-new-merge-strategy).
Notifications
You’re not receiving notifications from this thread.