git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: git@vger.kernel.org
Subject: suggestion for git stash
Date: Sun, 30 Sep 2007 20:50:41 +0200	[thread overview]
Message-ID: <200709302050.41273.bruno@clisp.org> (raw)

Hi,

"git stash" has the effect of losing the distinction between untracked
changes and changes in the index.

To reproduce:
- Clone the gnulib repository or of any repository with at least 2 files.
- Make changes to two files, say, README and NEWS.
  $ git add README
- $ git status
  now reports:
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   README
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   NEWS
#

- $ git stash
- $ git stash apply
- $ git status
  now reports:
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   NEWS
#       modified:   README
#
no changes added to commit (use "git add" and/or "git commit -a")

Could "git stash" be changed to memorize which changes were already
scheduled for commit and which didn't?

Bruno

             reply	other threads:[~2007-09-30 18:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 18:50 Bruno Haible [this message]
2007-09-30 19:59 ` suggestion for git stash Junio C Hamano
2007-09-30 20:28   ` Matthieu Moy
2007-09-30 20:59   ` Bruno Haible
2007-09-30 21:29     ` Johannes Schindelin
2007-09-30 22:30       ` [PATCH] git stash: document apply's --index switch Miklos Vajna

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709302050.41273.bruno@clisp.org \
    --to=bruno@clisp.org \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).