Hi, On Fri, 11 Jul 2008, Denis Bueno wrote: > On Fri, Jul 11, 2008 at 14:46, Johannes Schindelin > <Johannes.Schindelin@xxxxxx> wrote: > > BTW in your case, I would suggest this: > > > > INDEX_FILE=.git/bla git read-tree HEAD && > > INDEX_FILE=.git/bla git apply --cached patchfile && > > INDEX_FILE=.git/bla git archive [...] && > > rm .git/bla > > > > IOW: Just use a temporary index for your work. > > What is the rationale? So I can relieve the assumption that the index > is clean? Not completely. It will just leave the current index alone, ignoring the changes within it. It will also avoid having to update the index several times. IMO it is just the thing you should do here: you do not want to stage anything for commit, so keep .git/index as-is, and use a temporary staging area instead. It also avoids the need to "undo" things that might not be easily undone: if your patch contains stuff that was partly in the index, but uncommitted, neither "git reset" nor "git revert -n" will do what you want. Ciao, Dscho -- 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