emacs-devel
[Top][All Lists]
Advanced

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

Re: git question: how do I get a specific git version into my working di


From: Alan Mackenzie
Subject: Re: git question: how do I get a specific git version into my working directory?
Date: Sat, 18 Apr 2015 13:09:59 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Steinar.

On Sat, Apr 18, 2015 at 02:18:59PM +0200, Steinar Bang wrote:
> >>>>> Alan Mackenzie <address@hidden>:

> > Hello, Emacs.
> > A simple question (I hope):  How do I get a specific SW revision into my
> > working directory.  I want to do something like this:

> >    git <command> 7e09ef09a479731d01b1ca46e94ddadd73ac98e3

> > git checkout doesn't seem to be the thing.

> "git checkout 7e09ef09a479731d01b1ca46e94ddadd73ac98e3" should work.

> What result do you get and what were you expecting?  Do you have any
> uncommitted files it refuses to overwrite?  If so, try
>  git stash
>  git checkout 7e09ef09a479731d01b1ca46e94ddadd73ac98e3
>  git stash pop

> (don't stash if you have staged files, I think you have uncovered a bug
> there...)

No, I hadn't tried the command.  I have now, and it "seems to work".

> > Neither does git revert.  What is <command> here?

> The command is "checkout".

Thanks!

> WARNING! Dangeous work-losing command ahead!
> There is also
>  git reset --hard 7e09ef09a479731d01b1ca46e94ddadd73ac98e3
> which will overwrite anything uncommitted and set your workstate to the
> version described in 7e09ef09a479731d01b1ca46e94ddadd73ac98e3.

> If you just want to apply that commit, do:
>  git cherry-pick 7e09ef09a479731d01b1ca46e94ddadd73ac98e3

I am doing a bisect: a bisect where I only want revisions taken into
account when specific files have been modified.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]