git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* unexpected file deletion after using git rebase --abort
@ 2013-07-03 22:44 Paul A. Kennedy
  2013-07-03 22:56 ` Jonathan Nieder
  0 siblings, 1 reply; 6+ messages in thread
From: Paul A. Kennedy @ 2013-07-03 22:44 UTC (permalink / raw)
  To: git; +Cc: Paul A. Kennedy

Hello!

I lost a previously untracked file that I added to the index in the
middle of a git rebase --interactive session after a git rebase --abort.
This was unexpected.

    $ ls forgotten_file
    forgotten_file
    $ git rebase --interactive HEAD~3 
      [change first rebase command from pick to  edit]
    $ git add forgotten_file
    $ git rebase --abort
    $ ls forgotten_file
    ls: cannot access forgotten_file: No such file or directory
    $

I was (of course) able to find the SHA-1 of the dangling blob using 'git
fsck', and then retrieve the file using 'git cat-file -p SHA1'

Should this behaviour be considered a bug?  That is, should the contents
of the working directory (including untracked files) before the git
rebase invocation be returned (as if preserved by a git stash
--include-untracked)?  

If we don't expect this, should we update the documentation for the
--abort heading in the git rebase man page to indicate that newly
staged content will be lost after a git rebase --abort?

This is for git version 1.8.3

Paul

--
Paul A. Kennedy
pakenned@pobox.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-05  7:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 22:44 unexpected file deletion after using git rebase --abort Paul A. Kennedy
2013-07-03 22:56 ` Jonathan Nieder
2013-07-03 23:04   ` Junio C Hamano
2013-07-04 19:35     ` Paul A. Kennedy
2013-07-04 23:27       ` Eric Sunshine
2013-07-05  7:07       ` Junio C Hamano

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).