Package: git Version: 1:1.7.1-1 Severity: normal I stumbled on this problem yesterday, working in a sparse checkout of linux-next. I stupidly did a rebase on that day's linux-next, forgetting to add an --onto to account for that branch's constant rebasing. Conflicts ahoy!
Well, no big deal, just run git-rebase --abort and start over. Except that my index was full of unrelated files (those that didn't conflict). Strangely enough, even git-reset --hard wasn't enough to get rid of them, although git-reset --mixed was. That doesn't seem right to me. I suspect the problem is with git-reset, and not git-rebase, but I'll walk you through a complete example and let you smart people decide. :) git init # Let's create yesterday's tree echo '/* Definitions of the universe and everything */' > all.h git add all.h git commit -m 'Creating a baseline commit' # Linux includes lots of drivers we don't care about echo '/* Nothing interesting */' > boring.c git add boring.c git commit -m 'Creating a boring commit' git tag old # Now for today's tree, which has been rebased somewhat git reset --hard HEAD^ echo '/* Another boring file */' > more-boring.c echo '/* Oh noes, a conflict! */' > boring.c git add boring.c more-boring.c git commit -m 'Manufacturing a (partial) conflict' git tag new # We start our own development, on top of yesterday's tree git reset --hard old # And we ignore all those gazillion drivers git config core.sparsecheckout true echo all.h > .git/info/sparse-checkout git read-tree -m -u HEAD echo '/* Our interesting stuff */' > wow.c echo wow.c >> .git/info/sparse-checkout git add wow.c git commit -m 'Importing our interesting stuff' # Now we're ready to have fun! git rebase new git rebase --abort # See how the non-conflicting file is still in the index? git status # And see how reset --hard does not touch it, but --mixed does? git reset --hard git status git reset --mixed git status -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.33 (SMP w/1 CPU core) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages git depends on: ii libc6 2.10.2-9 Embedded GNU C Library: Shared lib ii libcurl3-gnutls 7.20.1-2 Multi-protocol file transfer libra ii libdigest-sha1-perl 2.12-1 NIST SHA-1 message digest algorith ii liberror-perl 0.17-1 Perl module for error/exception ha ii libexpat1 2.0.1-7 XML parsing C library - runtime li ii perl-modules 5.10.1-12 Core Perl modules ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime Versions of packages git recommends: ii less 436-1 pager program similar to more ii openssh-client [ssh-client] 1:5.5p1-4 secure shell (SSH) client, for sec ii patch 2.6-2 Apply a diff file to an original ii rsync 3.0.7-2 fast remote file copy program (lik Versions of packages git suggests: pn git-arch <none> (no description available) ii git-cvs 1:1.7.1-1 fast, scalable, distributed revisi pn git-daemon-run <none> (no description available) pn git-doc <none> (no description available) ii git-email 1:1.7.1-1 fast, scalable, distributed revisi pn git-gui <none> (no description available) ii git-svn 1:1.7.1-1 fast, scalable, distributed revisi ii gitk 1:1.7.1-1 fast, scalable, distributed revisi pn gitweb <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org