化石 dvcs 更新和签出命令之间的区别
阅读内置帮助后,在我看来,这两个命令都可以用于修改工作区以匹配某个修订版。但我不明白更新和结账之间的区别。请在您的答案中包含一些琐碎的工作流程,以显示何时适合更新/结账。
After reading the builtin help, it seems to me that both commads can be used for modifying the workspace to match a certain revision. But I don't understand the differences between update and checkout. Please include some trivial workflows in your answer which show when update/checkout are appropriate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个主要区别是,如果您设置了远程 url,
update
将从远程存储库pull
第一个最新工件。另一个区别是,如果您有未提交的更改,则结帐将不会运行(除非您强制执行),而更新将保留您的更改并重新应用它们。因此,通过更新,您可以在提交之前集成其他用户的更改。
所以:
First major difference is that if you have a remote url set,
update
willpull
first latest artifacts from the remote repository.Another difference is that if you have uncomitted changes, checkout will not run (unless you force it), whereas update will retain your changes and reapply them. With update you can therefore integrate changes from other users before committing.
So: