How to archive repo from sub-directory

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

 



If I have a git repo with several levels of sub-directories, how
do I get git-archive to archive the entire tree, and not just
the tree from where I am?  Example:

% cd foo
% cat .git/description
foo project
% cd bar/baz
% git archive --format=tar --prefix=foo/ HEAD | bzip2 > foo.tar.bz2

produces a tar file starting only at baz.

If I can't conjur this on the command line with a clever argument to
git archive (I've tried several), then how would I ask git "What is
your top-level directory" so at least I could write a script to
do this?


Bill
--
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]

  Powered by Linux