Using Git to create an archive of changed files
git
Solution
I'm using this answer in that case that tells me to
tar czf changed-files.tar.gz `git diff --name-only [diff options]`
For example, to create an archive containing the files changed in the last four revisions, I'd do
tar czf changed-files.tar.gz `git diff --name-only HEAD~4..`
This assumes – of course – that `HEAD~4` does actually exist.
Problem
I am looking for a simple solution to make a archive of recent changed file. I get this simple command from google ``` git archive -o update.zip HEAD $(git diff --name-only HEAD^) ``` When I run it in GIT BUSH, it keeps saying saying fatal: Not a valid object name