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 help requested: "git stash pop" is doing an unwanted "git add". Why? Date: Mon, 21 Dec 2015 05:35:06 +0200 Message-ID: <83y4coscd1.fsf@gnu.org> References: <20151220220127.GB26401@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1450668891 24544 80.91.229.3 (21 Dec 2015 03:34:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2015 03:34:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 21 04:34:46 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 1aArFF-0003zv-Dx for ged-emacs-devel@m.gmane.org; Mon, 21 Dec 2015 04:34:45 +0100 Original-Received: from localhost ([::1]:42927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArFE-0002BA-S6 for ged-emacs-devel@m.gmane.org; Sun, 20 Dec 2015 22:34:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArFB-0002B5-Gl for emacs-devel@gnu.org; Sun, 20 Dec 2015 22:34:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aArF6-0001lM-Fg for emacs-devel@gnu.org; Sun, 20 Dec 2015 22:34:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArF6-0001lI-CL; Sun, 20 Dec 2015 22:34:36 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4784 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aArF5-0000LL-Qv; Sun, 20 Dec 2015 22:34:36 -0500 In-reply-to: <20151220220127.GB26401@acm.fritz.box> (message from Alan Mackenzie on Sun, 20 Dec 2015 22:01:28 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:196588 Archived-At: > Date: Sun, 20 Dec 2015 22:01:28 +0000 > From: Alan Mackenzie > > I'm clearing out a "stash stack" in my master repository copy. I've > just done "git stash pop", expecting git to pop the changes into my > working directory. > > Well, there were 2 files with conflicts - fair enough. But with all the > other files, git has had the cheek to do a "git add" (I think the jargon > for this is "moved the files to the staging area"), leaving me with the > hassle of doing a "git reset" on quite a lot of files. > > Why has the "git stash pop" done this, and how can I call "git stash > pop" in the future, avoiding this annoying problem? It's "git stash pop", yes. You need to "git reset" after "stash pop", if you want to be sure the changes are not staged (a.k.a. "in the index").