Correct flow to update file in tracked directory


I’ve been reading the documentation ( on how to update tracked data. The examples here seem to talk about modifying files which are tracked individually.

I’d like to know what is the correct way to modify a file inside a tracked directory. So say I have the following tracked directory with two files inside it:

  - foo.csv
  - bar.csv

and i want to modify foo.csv and then commit the updates, is this the correct flow?

dvc unprotect foo.csv
<modify the file>
dvc add my_dir
dvc push

Thanks :slight_smile: