git log decoration origin/HEAD

僤鯓⒐⒋嵵緔 提交于 2019-12-08 07:52:55

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/17608970/git-log-decoration-origin-head

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!