views:

51

answers:

1

If I look at Mercurial's site, it seems to tell me to use update -C to switch between branches. Another Stack Overflow answer says to use checkout instead.

What are the differences? It seems to me that checkout updates the files in the working directory to the branch too, like update -C.

+4  A: 

hg checkout and hg update are aliases for each other, so can be used interchangeably. From the help for hg update:

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

aliases: up, checkout, co

update working directory (or switch revisions)
Niall C.