From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Stupid git! Date: Mon, 14 Sep 2015 12:29:37 +0200 Message-ID: <877fntway6.fsf@fencepost.gnu.org> References: <20150912101514.GA2322@acm.fritz.box> <877fnvn9nh.fsf@foo.bar.baz> <20150912130255.GF2322@acm.fritz.box> <83egi3brbw.fsf@gnu.org> <20150912203658.GA3711@acm.fritz.box> <55F48E7F.40602@yandex.ru> <20150912215114.GB3711@acm.fritz.box> <20150914102158.GA3208@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442226606 13649 80.91.229.3 (14 Sep 2015 10:30:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2015 10:30:06 +0000 (UTC) Cc: Sven Axelsson , emacs To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 14 12:29:59 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 1ZbR1I-0008Tz-MM for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 12:29:56 +0200 Original-Received: from localhost ([::1]:39624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbR1H-0006PB-SC for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 06:29:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbR12-0006Ob-BR for emacs-devel@gnu.org; Mon, 14 Sep 2015 06:29:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbR11-0001EB-IC for emacs-devel@gnu.org; Mon, 14 Sep 2015 06:29:40 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbR10-0001CT-6Y; Mon, 14 Sep 2015 06:29:38 -0400 Original-Received: from localhost ([127.0.0.1]:43161 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZbR0z-0007hk-Ld; Mon, 14 Sep 2015 06:29:37 -0400 Original-Received: by lola (Postfix, from userid 1000) id 32FAAE0897; Mon, 14 Sep 2015 12:29:37 +0200 (CEST) In-Reply-To: <20150914102158.GA3208@acm.fritz.box> (Alan Mackenzie's message of "Mon, 14 Sep 2015 10:21:58 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:189930 Archived-At: Alan Mackenzie writes: > Hello, Sven. > > On Sun, Sep 13, 2015 at 08:22:26AM +0200, Sven Axelsson wrote: > >> `git status` tells you if you are in a merge operation, as you can >> see from the message above. To back out and undo all changes >> introduced by the merge, you can use `git merge --abort`. > > Thanks! I'll note that down in case I even need it in the future. I think that if you have unstaged changes (possibly in files not touched by the merge) and start a merge (like with git pull or something), then do git merge --abort this may well get the changes killed for good: git merge --abort basically has only the index and repository to return to. I actually don't use git pull much myself: I rather use git fetch and then decide whether I want to merge or rebase or do whatever. And then I can choose just how I want to keep work from getting lost, by stashing it, or putting it in a branch or whatever else. Pulling is not a really good thing to do if you have uncommitted work. -- David Kastrup