Re: [RFC] reset --hard: warn before discarding staged content with no commit history
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 11, 2025, 03:24 UTC
- Message-ID
- <xmqqldj9g0pj.fsf@gitster.g>
- In-Reply-To
- <a5wKtD6Tn0gzcba1IEUhukYnXPHxMwPq6puQKIPywmjNufi5vc6vX-v5BpPJ7qj_zZsuXF5FiS2gbpsurWmVjoWHtMm8A-kAbaZyjMfrTcs=@proton.me>
Koutsouflakis Stefanos <koutsouflakis.stefanos@proton.me> writes:
> When running "git reset --hard" in a repository where staged > content has never been committed, the staged files are lost. This > seems like a case where requiring --force could be helpful.
The thinking has always been "'--hard' means what it says! HARD removes things harder than other modes---there is need to add '--force' to it".
So, I dunno.