Re: git symbolic-ref vs. reflog (vs. rebase)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 29, 2011, 16:19 UTC
- Message-ID
- <7vk4edyqqn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <ipek0o$l0v$1@dough.gmane.org>
Csaba Henk <csaba@lowlife.hu> writes:
> "git symbolic-ref" is a dangerous command in the sense that it can > change your HEAD position without updating the reflog. Is it > intended behaviour?
Yes, it is. But you can choose to do:
$ git branch side
$ git symoblic-ref -m "move to side" HEAD refs/heads/side
$ git log --oneline -g HEAD@{0}
05ddb9b HEAD@{0}: move to side
e69de29 HEAD@{1}: commit (initial): first commitif you wanted to.