From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Koutsouflakis Stefanos <koutsouflakis.stefanos@proton.me>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [RFC] reset --hard: warn before discarding staged content with no commit history
Date: Thu, 11 Dec 2025 14:25:35 +0900 [thread overview]
Message-ID: <xmqqcy4lfv3k.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cSep7+i2R-DDK+B6p6c3gy2Ehvm4U5N_PwSR-yZF3n1hA@mail.gmail.com> (Eric Sunshine's message of "Wed, 10 Dec 2025 22:59:51 -0500")
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Wed, Dec 10, 2025 at 10:24 PM Junio C Hamano <gitster@pobox.com> wrote:
>> 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".
>
> Presumably, you meant "there is *no* need" rather than "there is need".
Thanks. I rewrote the paragraph a few times and somehow losing the
crucial negation from there..
next prev parent reply other threads:[~2025-12-11 5:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 15:01 [RFC] reset --hard: warn before discarding staged content with no commit history Koutsouflakis Stefanos
2025-12-11 3:24 ` Junio C Hamano
2025-12-11 3:59 ` Eric Sunshine
2025-12-11 5:25 ` Junio C Hamano [this message]
2025-12-11 11:53 ` Koutsouflakis Stefanos
2025-12-11 12:22 ` Johannes Sixt
2025-12-11 16:33 ` Koutsouflakis Stefanos
2025-12-12 3:24 ` Junio C Hamano
2025-12-14 13:29 ` Koutsouflakis Stefanos
2025-12-14 13:45 ` Štefan Balog
2025-12-14 23:27 ` Junio C Hamano
2025-12-15 7:22 ` Koutsouflakis Stefanos
2025-12-12 22:14 ` D. Ben Knoble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqcy4lfv3k.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=koutsouflakis.stefanos@proton.me \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).