Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save christopher-francisco/b2e503285dc37519b5a8b01bb598f2af to your computer and use it in GitHub Desktop.
Save christopher-francisco/b2e503285dc37519b5a8b01bb598f2af to your computer and use it in GitHub Desktop.
Resolving conflicts on `.lock` files after rebase/merge
# Taken from https://github.com/yarnpkg/yarn/issues/1776#issuecomment-269539948
#
# 1. checkout the `.lock` file to the main branch’s one
# 2. run the install command on your package manager
# 3. it will update the `.lock` file, starting off the main branch’s one
# 4. commit the new `.lock` file
git checkout [branch with base yarn.lock] -- yarn.lock
yarn install
git add yarn.lock
git rebase --continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment