Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果克隆的 repo 处于分离 HEAD 状态并指向origin/<branch>,我如何获得原始分支名称?
origin/<branch>
git status显示HEAD detached at origin/<branch>,因此应该可以检索名称。
git status
HEAD detached at origin/<branch>