Linux command
dvc-commit 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Commit changes to .dvc files
dvc commit
Commit specific file
dvc commit [data.csv.dvc]
Commit with message
dvc commit -m "[message]"
Force commit
dvc commit -f
说明
dvc commit updates .dvc metadata files to reflect changes made to tracked data files in the workspace. After modifying a DVC-tracked file, its hash no longer matches the hash stored in the .dvc file. Running dvc commit computes the new hash and updates the .dvc file accordingly. This is analogous to git commit but for DVC-tracked data: it records that you intentionally changed the file and want to version this new state. The command moves the new version into the DVC cache and updates the metadata. Use dvc commit after editing data files, adding content to tracked directories, or replacing tracked files. The updated .dvc file can then be committed to Git, creating a new data version in your project history.
参数
- -f, --force
- Force commit even if unchanged.
- -m, --message _msg_
- Commit message.
- -R, --recursive
- Commit recursively.
FAQ
What is the dvc-commit command used for?
dvc commit updates .dvc metadata files to reflect changes made to tracked data files in the workspace. After modifying a DVC-tracked file, its hash no longer matches the hash stored in the .dvc file. Running dvc commit computes the new hash and updates the .dvc file accordingly. This is analogous to git commit but for DVC-tracked data: it records that you intentionally changed the file and want to version this new state. The command moves the new version into the DVC cache and updates the metadata. Use dvc commit after editing data files, adding content to tracked directories, or replacing tracked files. The updated .dvc file can then be committed to Git, creating a new data version in your project history.
How do I run a basic dvc-commit example?
Run `dvc commit` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --force do in dvc-commit?
Force commit even if unchanged.