From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel 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 Message-ID: <83pp717b0r.fsf@gnu.org> References: <20150418103301.GB4182@acm.fritz.box> <86sibx7hos.fsf@dod.no> <83twwd7gl9.fsf@gnu.org> <20150418131607.GD4182@acm.fritz.box> <83sibx7e2a.fsf@gnu.org> <55326530.3060304@math.ntnu.no> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1429368213 20206 80.91.229.3 (18 Apr 2015 14:43:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 14:43:33 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: Harald Hanche-Olsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 18 16:43:25 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YjTxs-00023U-8U for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 16:43:24 +0200 Original-Received: from localhost ([::1]:45886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTxr-0002YD-GP for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 10:43:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTxn-0002Y4-86 for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:43:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjTxh-00052c-W4 for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:43:19 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:40328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTxh-00052W-Nr for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:43:13 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NN000700AORB800@mtaout25.012.net.il> for emacs-devel@gnu.org; Sat, 18 Apr 2015 17:38:49 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NN0004FOBCPSN40@mtaout25.012.net.il>; Sat, 18 Apr 2015 17:38:49 +0300 (IDT) In-reply-to: <55326530.3060304@math.ntnu.no> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185594 Archived-At: > Date: Sat, 18 Apr 2015 16:07:44 +0200 > From: Harald Hanche-Olsen > Cc: Alan Mackenzie , emacs-devel@gnu.org >=20 > Eli Zaretskii wrote: > > If I were you, I'd do all this in a separate branch, just to be s= ure > > my 'master' branch had no chance whatsoever to be affected. Then= you > > could simply delete that branch when no longer needed. >=20 > Since the master branch is just a pointer into some specific commit= , I=20 > don't think anything you do while in a headless commit can affect t= he=20 > master branch in any way. (Unless, of course, you run commands that= =20 > specifically name the master branch in order to change it.) >=20 > To get to the master branch just as it was, run =E2=80=9Cgit checko= ut master=E2=80=9D. >=20 > If you made changes while in the headless commit, that will fail. I= n=20 > which case, either abandon the changes with =E2=80=9Cgit checkout -= f master=E2=80=9D, or=20 > 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.