Re: Decompressing a tree to a location other than the working directory
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 6, 2010, 18:43 UTC
- Message-ID
- <20100806184345.GB2985@burratino>
- In-Reply-To
- <AANLkTi=RjcQ_-PNUt781jhYEA-8krqXpdHRenVyR_Rc4@mail.gmail.com>
Joshua Shrader wrote:
> git checkout allows one to checkout a particular version of a certain > path in the working directory. Are there accessible plumbing commands > that can be used to accomplish the same thing, but change the target > directory.
I don’t know if it is plumbing, but "git archive" is very useful for that.
$ git archive HEAD^:Documentation | (cd elsewhere && tar xf -)
Hope that helps, Jonathan