git log decoration origin/HEAD

2019-06-07 03:12发布

I have two project repositories.

When I run git log --oneline --decorate --graph in each, one shows (HEAD, origin/dev, origin/HEAD, dev) and the other shows (HEAD, origin/dev, dev).

In both cases, dev is the default branch. Why does origin/HEAD show in one and not the other? What does one do to make origin/HEAD appear or not appear?

标签: git git-log
1条回答
Viruses.
2楼-- · 2019-06-07 04:07

As mention in "How does origin/HEAD get set?", it is set automatically on git clone.

That means:

  • either your second repo wasn't cloned (but initialized empty, added a remote and fetched)
  • or there was some rebase which makes origin/HEAD not visible.
    Try (to see all commits) a: git log --oneline --decorate --graph --all --branches
查看更多
登录 后发表回答