Archiving a git superproject and all of its submodules: git-archive-all.sh

From: Mr. Meitar Moscovitz <hidden>
Date: 2016-06-15 22:45:13

Hi all,

First-time poster, relatively green git user (I switched from  
Subversion about three months ago). So please don't bite…yet. :)

A co-worker wanted an easy way to archive a git superproject and all  
of its submodules (if any), so I created a shell script to do just  
that after being inspired by a message that I think was posted to this  
list and unfortunately can no longer find. The script is pretty simple  
(by which I mean it's probably kind of stupid), but it is a generic  
solution and it seems to do the job well. My team has been using it  
internally to  create deployment-ready tarballs that includes all the  
code of our (super)project and its dependent code in the git submodules.

If anyone is so inclined, I'd love some feedback on the script. I'm  
hosting it under the name "git-archive-all.sh" on Github:

http://github.com/meitar/git-archive-all.sh/wikis

The script has a few things I think are at least a little interesting.  
For instance, by default it creates a "super archive" of the project,  
but it can also be told to produce separate archives for each git repo  
(by passing a --separate option), and you can pass the --prefix option  
just as you can with git-archive, among other things.

Anyway, I hope someone finds this useful at some point.

Kind regards,
--
-Meitar Moscovitz
Personal: http://maymay.net
Professional: http://MeitarMoscovitz.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help