git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-reset: allow --soft in a bare repo

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2007, 05:19 UTC
Message-ID
<7vir8nmujo.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070714044916.GA24911@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> Previously, git-reset always required a work directory. For
> --mixed and --hard resets, this makes sense, as the bare
> repo doesn't have an index or a working tree. However, for
> --soft, there's no reason to prohibit this behavior.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> Somebody asked about this on irc ("how do I rewind history in a bare
> repo"). The only other ways right now are to update the ref manually
> (which involves plumbing), or to "git-push -f" from a non-bare
> repository. I can't think of any good reason why a soft reset shouldn't
> be allowed.
How about "git branch -f this $that"???
Previous: Jeff KingNext: Jeff King
Message 2 of 5 in “git-reset: allow --soft in a bare repo”
  1. git-reset: allow --soft in a bare repoJeff King, Jul 14, 2007
  2. Junio C HamanoJul 14, 2007
  3. Jeff KingJul 14, 2007
  4. Junio C HamanoJul 14, 2007
  5. Jeff KingJul 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.