Re: Problems switching branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 5, 2010 at 1:36 PM, Maaartin-1 <grajcar1@xxxxxxxxx> wrote:
>> But your approach may be better. Yes, I think it's possible. Any
>> suggestion for checkout's new argument? --no-overwrite-untracked seems
>> too long.
>
> I would go even further: a switch called "ignorant" or "lenient"
> allowing to always switch branches in a non-destructible way. All files
> normally causing abort would be left unmodified, so you could do
> git checkout --ignorant forth; git checkout back
> and would (assuming you started in branch "back") land in the original
> state without loosing anything. Of course, this means, that the ignorant
> checkout doesn't lead you into a clean state, but that's why I'd like to
> use a switch instead of making it the default. :)

One thing to consider. If there are conflicts, I don't think we should
allow this "ignorant" mode. That would mess up work tree in a bad way.
And because it would leave worktree in a dirty state, maybe
--dirty-worktree is suggestive.
-- 
Duy
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]