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

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

From
Jeff King <peff@peff.net>
Date
Jul 14, 2007, 05:24 UTC
Message-ID
<20070714052405.GA26107@coredump.intra.peff.net>
In-Reply-To
<7vir8nmujo.fsf@assigned-by-dhcp.cox.net>
On Fri, Jul 13, 2007 at 10:19:23PM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> > 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"???

Ah, I hadn't thought of that. It seems a bit of a contortion, though, since git-branch is usually used for _making_ a branch, whereas git-reset is usually used for _changing_ a branch. But maybe that's just me.

At any rate, it might still be worth applying the patch. It should be harmless to loosen the restriction, and even if there are several ways to accomplish the same thing, why punish people who try git-reset first? On the other hand, this is the first time I've seen it come up, so maybe this isn't confusing people.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.