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