Skip to content

How to solve cassette conflicts on GIT

Steven Wilkin edited this page Jul 4, 2017 · 3 revisions

It's a good idea to commit the cassettes because this way they can be reused by the CI server making the build faster. But Usually while rebasing master we get many conflicts on the cassettes the reason for that is because when a request changes or the cassettes expires it is re-recorded locally and sometime this same cassettes was already pushed by an other developer, the fix for this problem is explained bellow:

Checkout your branch

git checkout your_branch

rebase master

git pull --rebase origin master

if there is some conflict on the cassettes, keep your local version

git checkout --ours spec/cassettes
git add spec/cassettes

continue with the rebase

git rebase --continue

Remember to fix any other can conflict normally and use steps above whenever you get conflicts on your cassettes.