git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Madhu <enometh@meer.net>
To: git@vger.kernel.org
Subject: git-rebase --continue eats commits
Date: Sat, 31 Aug 2013 20:56:06 +0530 (IST)	[thread overview]
Message-ID: <20130831.205606.373615550.enometh@meer.net> (raw)
In-Reply-To: 20100626125924.160F11F212@leonis4.robolove.meer.net


Don't know if this has been resolved-by-debate here before, But if
`git-rebase' finds a hitherto untracked file in the worktree, which it
wants to create, it then aborts asking you to remove the file.  So if
you remove it and ask git to continue with `git-rebase --continue', it
then deletes the commit that was being applied from the branch. ---Madhu


(setenv "TDIR" "/dev/shm/foo/")

mkdir -pv $TDIR && cd $TDIR && git-init
(cd $TDIR && echo a > a && git add a && git commit -m "a")
(cd $TDIR && echo b > b && git add b && git commit -m "b")
(cd $TDIR && echo c > c && git add c && git commit -m "c")
(cd $TDIR && EDITOR="sed -i -e 's/^pick/edit/'" git rebase -i 'HEAD^^')
(cd $TDIR && echo fubar > c)
(cd $TDIR && git-rebase --continue)

    Rebasing (2/2)
error: The following untracked working tree files would be overwritten by merge:
	c
    Please move or remove them before you can merge.
    Aborting
    Could not apply ddd6f51...

(cd $TDIR && rm -fv c)
(cd $TDIR && git-rebase --continue)

    Rebasing (2/2)
Successfully rebased and updated refs/heads/master.

(cd $TDIR && git log)

;; commit `c' is gone

      parent reply	other threads:[~2013-08-31 15:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26 12:53 git-rebase --abort eats files Madhu
2010-06-26 18:09 ` Johannes Sixt
2010-06-28  9:05   ` Ramkumar Ramachandra
2010-06-29  1:23     ` Madhu
2010-06-29  6:47       ` Pete Harlan
2013-08-31 15:26 ` Madhu [this message]

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=20130831.205606.373615550.enometh@meer.net \
    --to=enometh@meer.net \
    --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).