Re: why is git destructive by default? (i suggest it not be!)
- From
- Jing Xue <jingxue@digizenstudio.com>
- Date
- Jun 25, 2008, 17:56 UTC
- Message-ID
- <20080625135647.wiohgih5hc0scgw0@intranet.digizenstudio.com>
- In-Reply-To
- <willow-jeske-01l5xqJDFEDjCftd>
Quoting David Jeske <jeske@google.com>:
> - add "checkout" to the git-gui history right-click menu, and make the > danger of > "reset --hard" more obvious and require a confirmation dialog (the gui > equivilant of -f)
Is that really necessary? The way it works now, when I choose "reset foo branch to here", a dialog prompts me to pick from the three reset modes, with 'Mixed' being the default. So I'd have to explicitly pick 'Hard', which has a message "discards ALL local changes" right next to it. If people are so conditioned to ignore that, I doubt it'll take very long for them to be conditioned to just automatically confirm the confirmation dialog.
The same applies to the command line as well I guess - if having to manually type "--hard" does not make one stop and think about what they are doing, I can hardly see how "--hard --force" would do any better.
Cheers.
-- Jing Xue