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

Re: reverting vs resetting

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Feb 5, 2010, 08:41 UTC
Message-ID
<vpqwryskrbi.fsf@bauges.imag.fr>
In-Reply-To
<7v1vh0jh0p.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> 	git branch andy_failed_experiment
>         git reset --hard HEAD~50
> 	;# and perhaps revert Bob's change here as well

So would I, and to complement Junio's answer: keeping a failure followed by a repair means this experiment will appear more or less forever in the output of "git log", "git blame", will break "git bisect" on that part of history, and so on. Putting it on a separate branch avoids this, and keeps it in a safe place to show newcommers: "see, here's what you should not do" ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Mihamina Rakotomandimby
Message 4 of 5 in “reverting vs resetting”
  1. Mihamina RakotomandimbyFeb 5, 2010
  2. Avery PennarunFeb 5, 2010
  3. Junio C HamanoFeb 5, 2010
  4. Matthieu MoyFeb 5, 2010
  5. Mihamina RakotomandimbyFeb 5, 2010

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.