Git archiving only branch work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]