Re: why is git destructive by default? (i suggest it not be!)
- From
- David Jeske <jeske@google.com>
- Date
- Aug 14, 2016, 00:43 UTC
- Message-ID
- <willow-jeske-01l64jJSFEDjCc0Q>
- In-Reply-To
- <FmVFerrNVumRho9GZZwRiHrXV_hb12J_P_hSYUBnFhcCFiMGdtdCrg@cipher.nrlssc.navy.mil>
-- Brandon Casey wrote:
> I only have the same advice I gave to Boaz. I think you should try to adjust > your workflow so that 'git reset' is not necessary. It seems that for the > functions you're trying to perform, 'checkout' and 'branch' should be used > rather than 'reset'.
Even when I change my workflow to avoid 'reset', I believe that the user-interface of git will be stronger if it is a simpler expression of the same functionality. One way to simplify it is to use convention that is standardized across a set of tools so we don't have to learn every little nuance of every little feature independently.
Two things I'd like to make it easy for users to never do are: - delete data - cause refs to be dangling
Therefore, I'd like a simple convention I can apply across all commands, so that if users never do them, they'll never do either of the above things. I'm not alone.
I think some of the impedance mismatch between my suggestions, and current usage, has to do with where I'd like to be next. This is a meaty topic, I'll start another thread on "policy and mechanism for less-connected clients".
> I'm not sure why you want to use reset so often. If there is something in the > documentation that led you to want to use reset maybe it can be changed so
that
> other users are not led in the same way.
Yes, it's a problem in the git-gui and the "reset --hard" documentation. I'm working on a patch.