[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: |
Steinar Bang |
Subject: |
Re: git question: how do I get a specific git version into my working directory? |
Date: |
Sat, 18 Apr 2015 14:18:59 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (windows-nt) |
>>>>> 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...)
> Neither does git revert. What is <command> here?
The command is "checkout".
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
- git question: how do I get a specific git version into my working directory?, Alan Mackenzie, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Andreas Schwab, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?,
Steinar Bang <=
- Re: git question: how do I get a specific git version into my working directory?, Eli Zaretskii, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Alan Mackenzie, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Dmitry Gutov, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Eli Zaretskii, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Harald Hanche-Olsen, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Eli Zaretskii, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Stefan Monnier, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Eli Zaretskii, 2015/04/18
- Re: git question: how do I get a specific git version into my working directory?, Harald Hanche-Olsen, 2015/04/18
Re: git question: how do I get a specific git version into my working directory?, Eric Abrahamsen, 2015/04/18