Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2019, 04:39 UTC
- Message-ID
- <xmqqr2ba9ii3.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <7d3742d6-73e4-2750-6ecb-9edf761d96dd@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 12 quoted lines
>> +-m:: >> +--merge:: >> + If you have local modifications to one or more files that are >> + different between the current branch and the branch to which >> + you are switching, the command refuses to switch branches in >> + order to preserve your modifications in context. However, >> + with this option, a three-way merge between the current >> + branch, your working tree contents, and the new branch is >> + done, and you will be on the new branch. > > I was wondering what people felt about making this the default for the > new command.
Even its inventor (me) never runs "-m" without first seeing checkout without "-m" fail, and seeing how much can potentially be lost if the branch switch conflicts by asking "git diff" (no other options). It is very unadvisable to make it the default.