From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen 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 16:07:44 +0200 Message-ID: <55326530.3060304@math.ntnu.no> References: <20150418103301.GB4182@acm.fritz.box> <86sibx7hos.fsf@dod.no> <83twwd7gl9.fsf@gnu.org> <20150418131607.GD4182@acm.fritz.box> <83sibx7e2a.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1429366093 21261 80.91.229.3 (18 Apr 2015 14:08:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 14:08:13 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 18 16:08:12 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 1YjTPm-0002XM-68 for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 16:08:10 +0200 Original-Received: from localhost ([::1]:45806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTPl-0001am-96 for ged-emacs-devel@m.gmane.org; Sat, 18 Apr 2015 10:08:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTPY-0001Zf-6G for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:07:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjTPX-00052z-Bs for emacs-devel@gnu.org; Sat, 18 Apr 2015 10:07:56 -0400 Original-Received: from hylle06.itea.ntnu.no ([2001:700:300:3::235]:60187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjTPW-00051y-1Z; Sat, 18 Apr 2015 10:07:54 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hylle06.itea.ntnu.no (Postfix) with ESMTP id 1874766B22B; Sat, 18 Apr 2015 16:07:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hylle06.itea.ntnu.no Original-Received: from [IPv6:2001:700:300:1470:31c5:898f:a437:f426] (unknown [IPv6:2001:700:300:1470:31c5:898f:a437:f426]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hanche) by hylle06.itea.ntnu.no (Postfix) with ESMTPSA id AB81B66B234; Sat, 18 Apr 2015 16:07:45 +0200 (CEST) User-Agent: Postbox 3.0.11 (Macintosh/20140602) In-Reply-To: <83sibx7e2a.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:700:300:3::235 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:185587 Archived-At: 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=20 don't think anything you do while in a headless commit can affect the=20 master branch in any way. (Unless, of course, you run commands that=20 specifically name the master branch in order to change it.) To get to the master branch just as it was, run =E2=80=9Cgit checkout mas= ter=E2=80=9D. If you made changes while in the headless commit, that will fail. In=20 which case, either abandon the changes with =E2=80=9Cgit checkout -f mast= er=E2=80=9D, or=20 stash them first. =E2=80=93 Harald