Fossil SCM

fossil-scm / www / co-vs-up.md
Source Blame History 31 lines
863fdca… wyoung 1 # Checkout vs Update
863fdca… wyoung 2
863fdca… wyoung 3 Fossil has two commands that look like they do the same thing on initial
863fdca… wyoung 4 examination, [`fossil update`][up] and [`fossil checkout`][co], but
863fdca… wyoung 5 there are several key differences:
863fdca… wyoung 6
863fdca… wyoung 7 1. `fossil checkout` aborts if there are changed files in the local
863fdca… wyoung 8 directory unless you give the `--force` option, whereas
863fdca… wyoung 9 `fossil update` merges upstream changes with your local changes.
863fdca… wyoung 10 Since Fossil tends to follow the CVS command design, and CVS
863fdca… wyoung 11 popularized the [merge on update][cvsmu] workflow, we expect that
863fdca… wyoung 12 Fossil’s update behavior is more likely to be what you want.
863fdca… wyoung 13
863fdca… wyoung 14 2. Update triggers an autosync attempt; checkout does not.
863fdca… wyoung 15
863fdca… wyoung 16 3. Several features in `fossil update` do not exist in
863fdca… wyoung 17 `fossil checkout`, so developing a habit to type `fossil up`
863fdca… wyoung 18 means you’re more likely to have the features you want at hand.
863fdca… wyoung 19
863fdca… wyoung 20 4. Inversely, the `fossil checkout --keep` feature doesn’t exist in
863fdca… wyoung 21 `fossil update`, but it’s a rarely-needed operation, so it doesn’t
863fdca… wyoung 22 provide a good reason to develop a habit of using `fossil checkout`
863fdca… wyoung 23 instead.
863fdca… wyoung 24
863fdca… wyoung 25 In summary, these are two separate commands; neither is an alias for the
863fdca… wyoung 26 other. They overlap enough that they can be used interchangeably for
863fdca… wyoung 27 some use cases, but `update` is more powerful and more broadly useful.
863fdca… wyoung 28
c64f28d… drh 29 [co]: /help/checkout
863fdca… wyoung 30 [cvsmu]: http://web.mit.edu/gnu/doc/html/cvs_7.html#SEC37
c64f28d… drh 31 [up]: /help/update

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button