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: Harald Hanche-Olsen
Subject: Re: git question: how do I get a specific git version into my working directory?
Date: Sat, 18 Apr 2015 16:07:44 +0200
User-agent: Postbox 3.0.11 (Macintosh/20140602)

Eli Zaretskii wrote:
If I were you, I'd do all this in a separate branch, just to be sure
my 'master' branch had no chance whatsoever to be affected.  Then you
could simply delete that branch when no longer needed.

Since the master branch is just a pointer into some specific commit, I don't think anything you do while in a headless commit can affect the master branch in any way. (Unless, of course, you run commands that specifically name the master branch in order to change it.)

To get to the master branch just as it was, run “git checkout master”.

If you made changes while in the headless commit, that will fail. In which case, either abandon the changes with “git checkout -f master”, or stash them first.

– Harald



reply via email to

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