Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

(unknown)

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:46:24

Possibly related (same subject, not in this thread)

Quoting John Dlugosz [off-list ref]:
=== 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help