Chitholian
Chitholian

Reputation: 472

Git-Archive Read Paths From a File or STDIN Instead of CLI Argument in Windows

I need to create an archive of changed files only between two commits. I use this command: git archive -o changes.zip HEAD $(git diff --name-only --diff-filter=d a1be79f0 HEAD). It works fine for small amount of changes. But now I have added a new module in the repository which includes a large number of new files. In windows, the command $(git diff --name-only --diff-filter=d a1be79f0 HEAD) results in a large number of file paths and hence exceeds single command length. I think it would be fine if I write the output of the git diff command in a file and pass that file to git archive. But I cannot find a way to feed a large number of file paths to git archive.

Upvotes: 2

Views: 110

Answers (0)

Related Questions