Re: git stash pop not reapplying deletions
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Feb 14, 2010, 22:08 UTC
- Message-ID
- <201002142308.01704.trast@student.ethz.ch>
- In-Reply-To
- <loom.20100214T200110-615@post.gmane.org>
On Sunday 14 February 2010 20:45:03 Steve Folly wrote:
> > I'm not sure if I've found a bug in 'git stash' or if I'm using > it the wrong way? (This is with git 1.6.6): >
[eliding a lot everywhere to make it clearer]
Show 14 quoted lines
> $ git status # correctly shows renames > # renamed: dira/a -> dirb/a > # renamed: dira/b -> dirb/b > # renamed: dira/c -> dirb/c > $ git stash > $ git stash pop > # Changes to be committed: > # new file: dirb/a > # new file: dirb/b > # new file: dirb/c > # Changed but not updated: > # deleted: dira/a > # deleted: dira/b > # deleted: dira/c
The problem is that you aren't using --index, but still expecting it to restore your index. If you change it to 'git stash pop --index', everything will work as expected.
Yes, it does stage new files, but that is only to help you: otherwise you could forget them before committing.
--
Thomas Rast
trast@{inf,student}.ethz.ch