This issue is 1 of 3 that I was asked to post here, following a conversation on Discord with mroutis and ivan
I encountered this problem within my first 15 minutes of using DVC: "how do I undo dvc add?"
The answer turns out to be:
unprotect the file, just in case
- Delete its corresponding .dvc file
- Optionally run
gc or look up the MD5 in data.dvc and delete it from .dvc/cache by hand.
It would be nice if this recipe were included somewhere in the docs.
Part of the reason this procedure was so non-obvious is that I never thought to look in https://dvc.org/doc/commands-reference/add. This turns out to have a complete technical explanation of linking, and what "protect" means in DVC. This document should be referenced early and often, maybe with a sentence like "For a technical explanation of the caching and linking process, see here".
In the meantime, hopefully my Stackoverflow self-answer will help other users, as well as get the DVC ball rolling on Stackoverflow.
DVC, like Git, admits the possibility of potentially-destructive beginner mistakes. I think it would be good practice to try and anticipate and provide recipes for undoing mistakes, and link to them prominently in the getting started documentation.
This issue is 1 of 3 that I was asked to post here, following a conversation on Discord with mroutis and ivan
I encountered this problem within my first 15 minutes of using DVC: "how do I undo
dvc add?"The answer turns out to be:
unprotectthe file, just in casegcor look up the MD5 indata.dvcand delete it from.dvc/cacheby hand.It would be nice if this recipe were included somewhere in the docs.
Part of the reason this procedure was so non-obvious is that I never thought to look in https://dvc.org/doc/commands-reference/add. This turns out to have a complete technical explanation of linking, and what "protect" means in DVC. This document should be referenced early and often, maybe with a sentence like "For a technical explanation of the caching and linking process, see here".
In the meantime, hopefully my Stackoverflow self-answer will help other users, as well as get the DVC ball rolling on Stackoverflow.
DVC, like Git, admits the possibility of potentially-destructive beginner mistakes. I think it would be good practice to try and anticipate and provide recipes for undoing mistakes, and link to them prominently in the getting started documentation.