Re: [PATCH] checkout.txt: note about losing staged changes with --merge
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 20, 2019, 01:19 UTC
- Message-ID
- <xmqqk1guwdeu.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8BLxWea0ZrHkSU6+nE7dr5YvFNVH1tLhaqPRadi+2Hhwg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 9 quoted lines
>> I think "checkout -m <otherbranch>" with a dirty index should refuse >> to run; there is nothing to "continue" after such a failure, so I am >> not sure what you mean by "an option to continue" (iow, I do not see >> a need for such an option, and if that option makes the whole notion >> strange, we can just decide not to have it, can't we?). > > We have --force to continue even when we have local changes, which > will be overwritten. I was thinking a similar option which gives us > permission to destroy staged changes.
Ah, then that is not "checkout --continue", but "checkout --force -m"? That sounds sensible, and should behave as if "checkout -f HEAD && checkout -m <otherbranch>" was done, with respect to local changes, I would think.