git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Reto <reto@labrat.space>
To: "Alex A. Davronov" <al.neodim@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Init-add-reset bug in a fresh repo
Date: Sun, 7 Aug 2022 19:22:20 +0200	[thread overview]
Message-ID: <20220807172220.z35ilb4z3xyywkor@feather> (raw)
In-Reply-To: <CAKBAyV4XaXC=Gw5SN9So9UAMJ9ZQE=8dA7B5D8+Wn4JKuFRDeA@mail.gmail.com>

> What did you expect to happen? (Expected behavior)
> - Files created prior to repo aren't getting removed

> What happened instead? (Actual behavior)
> - Files are gone.

That's literally what you instructed git to do...

--hard really means that, reset I don't care YOLO, --force, just do it
mate.

>--hard
>   Resets the index and working tree. Any changes to tracked files in the working tree since <commit> are discarded.
>   Any untracked files or directories in the way of writing any tracked files are simply deleted.

In other words, the flag does exactly what it's meant to do.

Kind regards,
Reto

      reply	other threads:[~2022-08-07 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 17:01 Init-add-reset bug in a fresh repo Alex A. Davronov
2022-08-07 17:22 ` Reto [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220807172220.z35ilb4z3xyywkor@feather \
    --to=reto@labrat.space \
    --cc=al.neodim@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).