From: Petr Baudis <pasky@suse.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Dave Jones <davej@redhat.com>, git@vger.kernel.org
Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
Date: Sat, 13 Aug 2005 13:00:51 +0200 [thread overview]
Message-ID: <20050813110050.GA5608@pasky.ji.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0508122151120.19049@g5.osdl.org>
Dear diary, on Sat, Aug 13, 2005 at 07:05:11AM CEST, I got a letter
where Linus Torvalds <torvalds@osdl.org> told me that...
> If you really want a temporary tree, what you do is something like
>
> git-checkout-cache --prefix=tmp-dir/ -f -a
>
> and when you're done, you just do
>
> rm -rf tmp-dir
>
> and you're done.
>
> NOTE NOTE NOTE! In the above, the order of the parameters is really really
> important! "-a" takes effect when it is seen, so it needs to be last.
> Also, the "--prefix" thing really _really_ needs the slash at the end,
> because it's literally used to prefix the pathname.
>
> HOWEVER, if all you want to do is just a tar-file, then there's a better
> solution. It's called
>
> snap=git-snapshot-$(date +"%Y%m%d")
> git-tar-tree HEAD $snap | gzip -9 > $snap.tar.gz
>
> which is even easier, and a hell of a lot more efficient.
To put my two cents too, Cogito has cg-export for this:
cg-export tmp-dir
to export to a temporary directory and
cg-export git-snapshot.tar.gz
to export to a gzipped tarball (it can also do .tar, .tgz and .tar.bz2).
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
next prev parent reply other threads:[~2005-08-13 11:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 4:17 Fwd: Re: git checkout -f branch doesn't remove extra files Dave Jones
2005-08-13 5:05 ` Linus Torvalds
2005-08-13 5:27 ` Dave Jones
2005-08-13 5:39 ` Linus Torvalds
2005-08-13 5:33 ` Linus Torvalds
2005-08-13 11:00 ` Petr Baudis [this message]
2005-08-13 12:10 ` Sergey Vlasov
2005-08-13 12:33 ` Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050813110050.GA5608@pasky.ji.cz \
--to=pasky@suse.cz \
--cc=davej@redhat.com \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.