-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exp apply: safeguard against unclean workspaces #6930
Comments
Related: iterative/dvc.org#2397 |
This was the original behavior for |
@pmrowla I hadn't noticed the I will monitor how I use |
@pmrowla Forcibly overwriting conflicts is intended as explained here and in iterative/dvc.org#2397, but it seems like experiments are overwriting everything in the workspace, even untracked files. This seems to conflict with iterative/dvc.org#2397 (comment). Example:
|
Another user asked about this in discord: https://discord.com/channels/485586884165107732/485596304961962003/963800799220211782. @pmrowla What do you think about bumping priority of this? It seems dangerous and potentially surprising to overwrite completely unrelated untracked files. |
Unrelated untracked files being removed sounds like a bug. As for the priority, I guess I'm not sure if that should be opened as a separate issue from this one? It's unclear to me whether this issue is about the removing untracked files bug or if it's a higher level discussion about whether |
I guess I hijacked this ticket from @mattlbeck. As mentioned in #6930 (comment) and other comments above, we already have discussed the default behavior and it usually makes sense to leave the current defaults. So let's either prioritize this issue to stop dropping unrelated untracked files, or close this one and open a new issue. |
dvc exp apply
will clear the workspace of untracked files and unstaged modifications. To prevent users losing work, it would be good to follow git's convention of preventing overwriting of untracked/modified files unless the user gives explicit permission.dvc exp apply
is executed on an unclean workspace, fail with a suggestion to stash work or specify a--force
flagdvc exp apply --force
acts like the current command does.The text was updated successfully, but these errors were encountered: