All of lore.kernel.org
 help / color / mirror / Atom feed
* git-rebase --abort eats files
@ 2010-06-26 12:53 Madhu
  2010-06-26 18:09 ` Johannes Sixt
  2013-08-31 15:26 ` git-rebase --continue eats commits Madhu
  0 siblings, 2 replies; 6+ messages in thread
From: Madhu @ 2010-06-26 12:53 UTC (permalink / raw)
  To: git

Don't know if this has been resolved-by-debate here before, But adding
a file via git-add in the middle of an interactive rebase and aborting
the rebase deletes the hitherto untracked file.  It should not. 

rm -rfv /tmp/t1 ; mkdir -pv /tmp/t1
cd /tmp/t1 && git-init-db
cd /tmp/t1 && touch file1 file2 file3
cd /tmp/t1 && git-add file1
cd /tmp/t1 && git-commit -m "Explet1" file1
cd /tmp/t1 && git-add file2
cd /tmp/t1 && git-commit -m "Explet2" file2
cd /tmp/t1 && git-rebase --abort
cd /tmp/t1 && EDITOR="sed -i -e 's/^pick/edit/'" git rebase -i 'HEAD^'
cd /tmp/t1 && git-add file3
cd /tmp/t1 && git-status
cd /tmp/t1 && git-rebase --abort
test -e /tmp/t1/file3 || echo bwaaah

Maybe something like this to fix it?

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 436b7f5..2702536 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -749,6 +749,7 @@ first and then run 'git rebase --continue' again."
                        git symbolic-ref HEAD $HEADNAME
                        ;;
                esac &&
+               git-reset &&
                output git reset --hard $HEAD &&
                rm -rf "$DOTEST"
                exit

--
Madhu

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

end of thread, other threads:[~2013-08-31 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` git-rebase --continue eats commits Madhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.