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.
我从托管在 code.google.com 的项目中创建了一个“服务器”克隆。我在我的机器上从该存储库创建一个克隆并推送一些更改;一切顺利。
现在主存储库有一些变化,我想拉它们。如何使用这些更改更新我的“服务器”克隆?
hg pull -u google_code_url
-u 表示自动更新您的工作副本。您可以在文件中设置(如果还没有)默认 URL .hg/hgrc:
.hg/hgrc
[paths] default = pull_url default-push = push_url
然后,你可以这样做:
hg push hg pull -u
当然,您仍然可以手动指定不同的位置。