Version control 在Mercurial分支之间切换

Version control 在Mercurial分支之间切换,version-control,mercurial,branch,Version Control,Mercurial,Branch,如果我看一下,它似乎告诉我使用update-C在分支之间切换。另一个答案是使用checkout 有什么区别?在我看来,checkout也会将工作目录中的文件更新到分支,如update-Chg checkout和hg update是彼此的别名,因此可以互换使用。从hg更新的帮助中: hg update [-c] [-C] [-d DATE] [[-r] REV] aliases: up, checkout, co update working directory (or switch revi

如果我看一下,它似乎告诉我使用
update-C
在分支之间切换。另一个答案是使用
checkout


有什么区别?在我看来,
checkout
也会将工作目录中的文件更新到分支,如
update-C
hg checkout
hg update
是彼此的别名,因此可以互换使用。从hg更新的帮助中:

hg update [-c] [-C] [-d DATE] [[-r] REV]

aliases: up, checkout, co

update working directory (or switch revisions)
-C
-clean
选项用于在切换时丢弃未提交的更改