Skip to content

Instantly share code, notes, and snippets.

@coliver
Forked from carlflor/Gemfile-lock-fix.md
Created March 23, 2020 14:01
Show Gist options
  • Save coliver/366315c0d729eb884727a4e497757954 to your computer and use it in GitHub Desktop.
Save coliver/366315c0d729eb884727a4e497757954 to your computer and use it in GitHub Desktop.
This fixes the Gemfile.lock conflict when doing git rebase

If both the upstream and your feature branch have made changes to Gemfile, you will likely receive merge conflicts on Gemfile.lock when you rebase your feature branch. Don't try to resolve these manually; you'll probably just screw it up. Instead do this:

    git checkout --ours Gemfile.lock
    bundle
    git add Gemfile.lock
    git rebase --continue

This ensures that you get a correct Gemfile.lock at each step along the way.

from: https://www.snip2code.com/Snippet/302682/Handling-Gemfile-lock-conflicts-during--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment