git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git archiving only branch work
@ 2014-11-13 12:32 Graeme Geldenhuys
  2014-11-13 13:19 ` Peter Krefting
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Graeme Geldenhuys @ 2014-11-13 12:32 UTC (permalink / raw)
  To: git

Hi,

I've strung together the following git alias command for our company. 
This command allows us to create a deployment package (archive) for a 
specific feature. The archive will contain only the files that changed 
during the development of that feature. We then deploy that archive to 
our client's web/database server for example.

[alias]
    deploy = !sh -c 'git archive --prefix=$1/ -o deploy_$1.zip HEAD 
$(git diff --name-only -D $2)' -


usage:
   git deploy OPS123 develop..ops-123


'OPS123' is the prefix directory to store the changes in
'ops-123' is the feature branch the work was done in.

This works very well. The only problem we have so far is that if we 
have files with spaces in the name (eg: SQL update scripts), then the 
command breaks.

Does anybody have an idea on how this can be resolved?  Any help would 
be much appreciated.

Not sure if this is useful, but we are working on Windows systems and 
use Git Bash consoles.

Regards,
  Graeme

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-11-14 20:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 12:32 Git archiving only branch work Graeme Geldenhuys
2014-11-13 13:19 ` Peter Krefting
2014-11-13 13:36 ` Duy Nguyen
2014-11-13 16:49   ` Junio C Hamano
2014-11-13 20:06   ` Jeff King
2014-11-13 21:10     ` Junio C Hamano
2014-11-13 21:33       ` Jeff King
2014-11-13 21:36         ` Junio C Hamano
2014-11-13 21:39           ` Jeff King
2014-11-13 21:48             ` Junio C Hamano
2014-11-14 15:32               ` Jeff King
2014-11-14 20:35                 ` Junio C Hamano
2014-11-13 16:10 ` Thomas Koch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).