unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Git help requested: "git stash pop" is doing an unwanted "git add". Why?
Date: Mon, 21 Dec 2015 05:35:06 +0200	[thread overview]
Message-ID: <83y4coscd1.fsf@gnu.org> (raw)
In-Reply-To: <20151220220127.GB26401@acm.fritz.box> (message from Alan Mackenzie on Sun, 20 Dec 2015 22:01:28 +0000)

> Date: Sun, 20 Dec 2015 22:01:28 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> 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").



  parent reply	other threads:[~2015-12-21  3:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-20 22:01 Git help requested: "git stash pop" is doing an unwanted "git add". Why? Alan Mackenzie
2015-12-20 22:48 ` David Kastrup
2015-12-20 23:04   ` Alan Mackenzie
2015-12-21  3:35 ` Eli Zaretskii [this message]
2015-12-21 20:26   ` Alan Mackenzie
2015-12-22 15:35     ` Mike Gerwitz
2015-12-22 16:11       ` Renaud Casenave-Péré

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=83y4coscd1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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).