Re: git-archive ignores submodules
- From
- Pedro Rodrigues <prodrigues1990@gmail.com>
- Date
- Apr 16, 2015, 18:09 UTC
- Message-ID
- <CAL1ZDKbcmrer481fRY2NEHUQ1J5tjRbHz2yLEcszh3Q-NjcvcQ@mail.gmail.com>
- In-Reply-To
- <20150416175623.GJ21868@paksenarrion.iveqy.com>
Good to know about git submodule foreach.
Simpler yet, I'm using:
zip -r ../project.zip . -x *.git*
Which essentially does the same thing I would need from git-archive --recurse-submodule, zip everything excluding .git folders. Still would be better to use git itself.
2015-04-16 18:56 GMT+01:00 Fredrik Gustafsson <iveqy@iveqy.com>:
Show 24 quoted lines
> On Thu, Apr 16, 2015 at 06:35:38PM +0100, Pedro Rodrigues wrote: >> I've been using git-archive as my main way of deploying to production >> servers, but today I've come across a git repo with submodules and >> found out that git archive has no option to include submodules on the >> output archive. > > As far as I know this is an known limitation that's just waiting for > someone to solve. Thanks for bringing attention to it. > >> This simply makes git-archive unusable on this scenario. > > Not completely. There's a simple workaround. Combine git submodule > foreach with git archive and make an archive for each submodule. > > Not as simple as if git archive --recurse-submodule would have been > implementet, but hopefully it can make things work for you at the > moment. > > -- > Fredrik Gustafsson > > phone: +46 733-608274 > e-mail: iveqy@iveqy.com > website: http://www.iveqy.com
-- Pedro Rodrigues +244 917 774 823 +351 969 042 335 Mail: prodrigues1990@gmail.com