I am trying to create an archive of the files in the latest 3 commits using the following command.
git archive -o archive.zip $(git diff --name-only HEAD~3)
But in the last commit i deleted a few files, this is showing in the diff
output. so i am getting this error:
fatal: pathspec 'public/uploads/5839529ba9381.png' did not match any files
How do i ignore the files that are deleted in a commit during git archive? I've tried the --ignore-unmatch
argument but its not working.