开发者

fossil dvcs difference between update and checkout commands

开发者 https://www.devze.com 2023-01-29 01:37 出处:网络
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 checkou

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开发者_StackOverflow社区. Please include some trivial workflows in your answer which show when update/checkout are appropriate.


First major difference is that if you have a remote url set, update will pull 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:

  • Update is what you need when you collaborate on a project, in order to prevent forks.
  • Checkout lets you deploy a particular version.
0

精彩评论

暂无评论...
验证码 换一张
取 消