简体   繁体   English

如何了解Mercurial的最新分支机构?

[英]How can I learn which branch is the latest branch in Mercurial?

I would like to checkout from the latest branch in mercurial, but I don't know which one it is. 我想从Mercurial的最新分支结帐,但我不知道它是哪个分支。 How do I list all the branches of a project in Mercurial, and how do I checkout from the latest one? 如何列出Mercurial中某个项目的所有分支,以及如何从最新分支中检出?

The tag tip is always assigned to the most recent changeset; 标记tip始终分配给最新的变更集。 hg update -r tip will update to this changeset regardless of which branch you were working in before. hg update -r tip将更新到此变更集,而不管您之前在哪个分支中工作。

hg tip will show information about the tip, including the branch name. hg tip将显示有关提示的信息,包括分支名称。

Wooble has answered the 2nd part of your question. Wooble已回答了您问题的第二部分。 As for the first part... 至于第一部分...

How do I list all the branches of a project in Mercurial 如何列出Mercurial中项目的所有分支

Assuming you mean named branches , then hg branches 假设您的意思是命名分支 ,然后是hg branches

If you mean heads then hg heads 如果您的意思是头,那么hg heads

Each of those commands has various options about seeing closed branches, etc. 这些命令中的每一个都有关于查看封闭分支等的各种选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM