From: Junio C Hamano Date: Thu, 14 Mar 2019 04:39:48 GMT Subject: Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch' Message-ID: In-Reply-To: <7d3742d6-73e4-2750-6ecb-9edf761d96dd@gmail.com> Phillip Wood writes: >> +-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.