Re: Stash during incomplete merge
- From
- Neal Kreitzinger <nkreitzinger@gmail.com>
- Date
- Feb 29, 2012, 19:34 UTC
- Message-ID
- <4F4E7DC1.1050700@gmail.com>
- In-Reply-To
- <4F4D5408.3060505@gmail.com>
On 2/28/2012 4:24 PM, Neal Kreitzinger wrote:
Show 23 quoted lines
> On 2/28/2012 2:22 PM, Neal Kreitzinger wrote: >> >> You may also want to consider the --keep-index option on your "git >> stash save" if your "testing" workflow doesn't involve adds or >> commits before the git stash apply/pop. >> > the very limited case I had in mind (and probably incorrect > assumption) about your "testing" workflow was: > > hack merge-conflicts $ git add conflict-resolution > (conflict-resolution is in worktree and index) hack > conflict-resolution with extra stuff (original conflict-resolution > is still in index) uh-oh, i got carried away and started doing extra > stuff (evil merge) and forgot to finish testing just the > conflict-resolutions (pure merge-commit) $ git stash --keep-index > (conflict-resolution is still in index and now back in wokrtree) > finish testing just the conflict-resolutions (merge-commit-to-be) > (conflict resolutions worked (I knew they would)) $ git stash pop > (original conflict resolution is still in index, but extra-stuff is > back in worktree) $ git commit (commit the > conflict-resolutions/merge-commit) $ git add foo $ git commit (new > foo stuff committed after merge commit) >
This imaginary scenario I proposed for --keep-index can get a merge-conflict on the pop so its invalid. Please disregard it. Sorry for the bum scoop.
v/r, neal