config: document new core.autostage setting#1779
Conversation
| - `core.autostage` - if enabled, DVC will automatically stage (`git add`) | ||
| modified DVC files as it updates them. The files will not be commited, and | ||
| user modified files will not be staged unless DVC then later modifies them. | ||
| Accepts values `true` and `false` (default). |
There was a problem hiding this comment.
Nice. How about simplifying a little to
if enabled, DVC will automatically stage (`git add`) `.dvc` files(1) created or modified by DVC commands(2). The files will not be committed. Accepts values `true` and `false` (default).
2 questions though:
- Does this only affect
.dvcfiles? (Should probably work for all metafiles including dvc.yaml and .lock) — see dvc add config option to auto-stage .dvc files to git dvc#4330 (comment) - Which DVC commands dispay this behavior? Just
dvc add?dvc commit? Etc. A full list would be useful.
Thanks
There was a problem hiding this comment.
Sure. That's simpler lol
- This includes all modified files.
- Any command that changes tracked files should do this?
It replaces the code in the hook to remind you to track files so any command that would make that output would stage the files for commit instead when this is enabled.
There was a problem hiding this comment.
Thanks.
- OK great, let's use
[DVC metafiles](/doc/user-guide/dvc-files-and-directories)then, please. - it would be great to try it and double check which ones, and add a list with some of them, the more obvious ones a t least, like
add,run,import, maybecommit.
There was a problem hiding this comment.
I still wonder what the exact full list of commands that use that hook is.
|
Maybe a note about this in the |
|
Okay. I added a blurb in |
| 6. Instructions are printed showing `git` commands for adding the files, if | ||
| appropriate. | ||
| 6. Instructions are printed showing `git` commands for staging `.dvc` files | ||
| (or they are staged automatically if | ||
| [`core.autostage`](/doc/command-reference/config#core) is set). |
There was a problem hiding this comment.
This is the perfect place for this note, thanks!
I wonder if other there are similar places in other commands that need this same parenthesis...
There was a problem hiding this comment.
Please if you see any other places, add this in another PR. Thanks
jorgeorpinel
left a comment
There was a problem hiding this comment.
Thanks again @bobertlo
* guide: use back quotes in headers per #1735 (comment) * guide: use ```yaml instead of yml (consistency) * guide: capitalize bullet list * intsall: remove unnecessary line in Linux/snap * guide: make H3s into expandable sections in x data docs per #1735 (comment) * cmd: cosmetic updates to cache.{type} config option descriptions * cmd: std option descs in diff per pending items in #1758 * cmd: small impro to diff * term: review usage of SCM * cmd: remove redundant wording in add * cmd: fix format and typo intro by #1779
|
@jorgeorpinel oops this feature has been reviewed but not merged into core yet fyi |
|
Yeahoops I noticed this on the live docs and then realized it´s not merged in core 🤦♂️ Oh well it's not a big deal. I doubt anyone will find it and try using it before it's actually released. |
related to treeverse/dvc#4543
❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.
🐛 Please make sure to mention
Fix #issue(if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.Please choose to allow us to edit your branch when creating the PR.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏