From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id CD6971F54E for ; Sun, 7 Aug 2022 17:22:30 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=labrat.space header.i=@labrat.space header.b="WLfM2D/r"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233475AbiHGRW2 (ORCPT ); Sun, 7 Aug 2022 13:22:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiHGRW1 (ORCPT ); Sun, 7 Aug 2022 13:22:27 -0400 Received: from mariecurie.labrat.space (mariecurie.labrat.space [116.203.185.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F5CA5FE9 for ; Sun, 7 Aug 2022 10:22:26 -0700 (PDT) Received: from labrat.space (adsl-178-38-36-59.adslplus.ch [178.38.36.59]) by mariecurie.labrat.space (Postfix) with ESMTPSA id B77A43D10712; Sun, 7 Aug 2022 19:22:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=labrat.space; s=201904; t=1659892943; bh=Qa/hwQ0vuYCaWM9AEEBe4h3KZXCt+RNa+G2qQ4I3Io0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:From:To:CC:Date: Subject:Content-Type:Content-Disposition:Reply-To:In-Reply-To: MIME-Version:Message-ID:References; b=WLfM2D/rc/cctNq/GBIkHdUSDCllxwCRrbPyEpmzGecoa1mZ0fDAHznlgp/yd8wu1 Kr+0qY/lHPER5icdwF4nUAVivl6m+/JVKVfRzmQE8328qW8m3sMnxOWC9bRlSWD2Jl d6/vxekzeTazfd97mFqJ9Lju/6Gpkof7C00+2VO/os9V7sfQl4rvhyEsKTAxHC3g/J oSgb2VMlA0CaTAYbOwSK0FJfEfOX4nNGWatfLBPJ4PNKfgCPeAW2/xuWzyW2WNDzFL GuCwKdRkwp0wnq2FXhfO6ghFiiAMo4lCkbjx20UAM+fRzW5bWqaOtNSKxQJNuB74pt mfVtkpf/YWGRA== Date: Sun, 7 Aug 2022 19:22:20 +0200 From: Reto To: "Alex A. Davronov" Cc: git@vger.kernel.org Subject: Re: Init-add-reset bug in a fresh repo Message-ID: <20220807172220.z35ilb4z3xyywkor@feather> Mail-Followup-To: "Alex A. Davronov" , git@vger.kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org > 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 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