kevin-hanselman/dud

How do you add a directory?

ezhang7423 opened this issue · 2 comments

ubuntu@base ~/d/runs (main) [1]> dud stage add 2023-07-24 
Error: 2023-07-24: yaml: input error: read 2023-07-24: is a directory

If this isn't supported, it seems like a pretty essential feature...

Mh, it works different:

  1. Add your directory to stage file
dud stage gen -o my/dir/ | tee my_dir.yaml 
  1. Add stage
dud stage add my_dir.yaml 

Do the rest:

dud commit
dud push
git add .
git commit -m "Added dir"
git push

Thanks for the question, @ezhang7423! Sorry for the late response; I was away on vacation for a while.

@thorstenwagner has shown how this is done in Dud; thanks a bunch, @thorstenwagner!

TLDR: stage gen generates/creates a stage file, and stage add adds a stage file to Dud's index.