Using git archive commmand is it possible to download only the changed/affected files from a repository for a particular commit id ? Is it possible using the web interface @ bitbucket ?
Git archive is a helpful utility for creating distributable packages of git repositories. Git archive can target specific refs of a repository and only package the contents of that ref. Git archive has several output formats that can utilize added compression.
Git stores the complete history of your files for a project in a special directory (a.k.a. a folder) called a repository, or repo. This repo is usually in a hidden folder called . git sitting next to your files.
List the files changed in a commit with git diff-tree
and pass them to the command line of git archive
.
git archive --format=zip --output=commit_files.zip <tree-ish> `git diff-tree --no-commit-id --name-only -r <tree-ish> | sed ':a;N;$!ba;s/\n/ /g'`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With