Need help with merging (not conflicts)

Let’s say I’m on a branch branch, have done some work, and now want to merge this branch into main.
All changes have been commited and pushed. There are no conflicts.

git checkout main

What should I do here? dvc checkout?

Now I merge the branch.

git merge branch

What should I do here? dvc checkout again?

I’m getting errors asking if my cache is up to date, and linking to the docs, which unfortunately do not include that error text. I also haven’t found a definitive guide for a scenario like the above for merging branches.

Error text:

Project on  main [!] via 🅒 ng 
❯ dvc checkout
M       data/                                                                                                                                 
ERROR: Checkout failed for following targets:                                                                                                 
raw                                                                                                                                           
Is your cache up to date?                                                                                                                     
<https://error.dvc.org/missing-files>   

Thanks

Yes. If there are no conflicts that should be enough. An automation via git hooks can be enabled with dvc install command.

What should I do here? dvc checkout again?

Yes, it some .dvc or dvc.lock were updated. You could run dvc status or dvc data status to check the current state. Can you share those outputs?

Is your cache up to date?

Hmm, that’s a bit weird. Are you able to checkout data/raw in the branch? Can it be that you need to run dvc pull first (since it’s new branch, that you haven’t interacted with yet)?

Thanks for this reply!

I have run dvc install, but it’s not as seamless as I had hoped.
Here’s what GPT-4 told me:

dvc fetch - download data from the remote server to the cache, but don’t update the workspace.
dvc checkout - update the workspace using data in the cache.
dvc pull - download data from the remote server, then update the workspace.

I guess I’ll just do dvc pull from now on. :person_shrugging: