We've moved discussions to Discord

Resolving merge conflicts on files I'm told not to edit

What is the recommended method of resolving merge conflicts on files like yarn.lock and schema.rb -- both files I'm told not to edit. After running git merge jumpstart/master I have git merge conflict code to resolve, but it doesn't feel right to edit those files directly. This newbie would appreciate any guidance!
Sean Drumm •
Generally for yarn.lock, Gemfile.lock, or any other package manager lock file, I've done this for years:

git checkout -- yarn.lock

yarn

git add yarn.lock

This resets the file to whatever was committed on your branch, and then running the package manager command will update the contents. I sometimes just delete the file and it seems to have the same affect.

For schema.rb I'm a Rails newbie too, not hit this yet. This seems reasonable: 

https://stackoverflow.com/a/7614339

Notifications
You’re not receiving notifications from this thread.