From: Eli Zaretskii <eliz@gnu.org>
To: Harald Hanche-Olsen <hanche@math.ntnu.no>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: git question: how do I get a specific git version into my working directory?
Date: Sat, 18 Apr 2015 17:43:00 +0300 [thread overview]
Message-ID: <83pp717b0r.fsf@gnu.org> (raw)
In-Reply-To: <55326530.3060304@math.ntnu.no>
> Date: Sat, 18 Apr 2015 16:07:44 +0200
> From: Harald Hanche-Olsen <hanche@math.ntnu.no>
> Cc: Alan Mackenzie <acm@muc.de>, emacs-devel@gnu.org
>
> 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.
Yes, I know all that. But I'd still do all that on a separate branch,
since 'master' is not supposed to be used for such stuff, it's
supposed to track upstream as close as possible.
Better be safe than sorry.
next prev parent reply other threads:[~2015-04-18 14:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-18 10:33 git question: how do I get a specific git version into my working directory? Alan Mackenzie
2015-04-18 10:42 ` Andreas Schwab
2015-04-18 12:18 ` Steinar Bang
2015-04-18 12:42 ` Eli Zaretskii
2015-04-18 13:16 ` Alan Mackenzie
2015-04-18 13:20 ` Dmitry Gutov
2015-04-18 13:37 ` Eli Zaretskii
2015-04-18 14:07 ` Harald Hanche-Olsen
2015-04-18 14:43 ` Eli Zaretskii [this message]
2015-04-18 17:09 ` Stefan Monnier
2015-04-18 17:37 ` Eli Zaretskii
2015-04-18 17:44 ` Harald Hanche-Olsen
2015-04-18 12:48 ` Eric Abrahamsen
2015-04-18 13:09 ` Alan Mackenzie
2015-04-18 13:18 ` Dmitry Gutov
2015-04-18 13:57 ` Steinar Bang
2015-04-18 14:03 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pp717b0r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=hanche@math.ntnu.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).