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

(unknown)

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Mar 16, 2009, 21:45 UTC
Message-ID
<20090317064519.6117@nanako3.lavabit.com>
In-Reply-To
<450196A1AAAE4B42A00A8B27A59278E70A2AEFD7@EXCHANGE.trad.tradestation.com>
Quoting John Dlugosz <JDlugosz@TradeStation.com>:
Show 7 quoted lines
> === Re: ===
>  (2) if you are not, you can obviously check out topic and do the above,
>      or "git branch -f topic topic^".
> === end ===
>
> As documented, this destroys the existing branch and makes a new one.
> That would, by design, blow away the reflog for that branch.
Does it?  If so I think you have an incorrect documentation.

$ rm -fr /tmp/gomi && mkdir /tmp/gomi $ cd /tmp/gomi $ git init $ echo hello >world $ git add world $ git commit -m initial $ seq 1 100 | while read num; do echo $num >world; git commit -a -m $num; done $ git checkout -b side master~60 $ git branch -f master master@{20} $ git log --oneline -g master | head -n 10 0acf8c1 master@{0}: branch: Reset from master@{20} 945c3ee master@{1}: commit: 100 54fcb36 master@{2}: commit: 99 b314a1e master@{3}: commit: 98 e91d999 master@{4}: commit: 97 0d88853 master@{5}: commit: 96 0124315 master@{6}: commit: 95 5df2cc5 master@{7}: commit: 94 14bb58e master@{8}: commit: 93 0813a46 master@{9}: commit: 92

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: John DlugoszNext: Junio C Hamano
Message 10 of 15 in “undoing something”
  1. John DlugoszMar 16, 2009
  2. Junio C HamanoMar 16, 2009
  3. John DlugoszMar 16, 2009
  4. Junio C HamanoMar 16, 2009
  5. Effective PostingJohn Dlugosz, Mar 16, 2009
  6. René ScharfeMar 16, 2009
  7. John DlugoszMar 16, 2009
  8. Jay SoffianMar 16, 2009
  9. John DlugoszMar 16, 2009
  10. (unknown)Nanako Shiraishi, Mar 16, 2009
  11. Junio C HamanoMar 17, 2009
  12. git-branch.txt: document -f correctlyMichael J Gruber, Mar 17, 2009
  13. Junio C HamanoMar 17, 2009
  14. Michael J GruberMar 17, 2009
  15. John DlugoszMar 17, 2009

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.