git-rebase --continue eats commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]