home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] can i "git checkout" an earlier version of a file *only* into working directory?

  • Subject: Re: [OCLUG-Tech] can i "git checkout" an earlier version of a file *only* into working directory?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Tue, 6 Oct 2015 07:16:57 -0700 (PDT)
On Tue, 6 Oct 2015, Alex Pilon wrote:

> On Tue, Oct 06, 2015 at 05:36:06AM -0700, Robert P. J. Day wrote:
> > is there an option to check the file out only in the working
> > directory?
>
> Not as far as I know, but if you're only doing single files;
>
>     git show v4.0:Makefile > Makefile

  i knew that little hack ... i guess i'm a little surprised that
there's no straightforward to do it since (at least to me), checking
out an earlier version of a file into *just* the WD is more
intuitively natural than into both the WD and the index.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================