+1

git archive support

Joel 4 years ago updated by Alexandre Gambier 3 years ago 5

I often want to archive to zip format a set of commits. I use this: git archive --output=file.zip HEAD $(git diff --name-only HEAD^ 6b1fee558318cc9cd65b3369c5a33de4a131694f )


This is great except when the resultset from git diff has too many entries. This may be because we have commit A, B, and C. Commit A modified 10 files. Commit B added 4,000 files and Commit C modified 5 files. Ideally I would like to be able to select only Commit A and C from the log and pass them to git archive instead of passing a range of commits. This allows me to avoid Commit B with the many added files.


Also, it would nice to have this functionality within a GUI

would be great to implement git archive

What options you would need? Would an external tool be sufficient for you?

I already though of using an external tool with bash scripts but it would nice if it was fully supported by smartgit so it will be cross platform.


In the log window, using the right-click popup menu, we could select an action "Archive this commit..." and smargit could ask for the output filename (location and name) and archive file format (tar, tar.gz or zip).



With a fixed format it could be configured like that:

Thanks for the tips.


But today I convinced my team leader to buy 10 licences of smartgit it would be nice if we don't have to manually add this feature for the 10 dev computers.