1
Working offline on a central branch
2
===================================
4
The centralized with local commits workflow
5
-------------------------------------------
7
If you lose your network connection because you are travelling, the central
8
server goes down, or you simply want to snapshot changes locally without
9
publishing them centrally just yet, this workflow is for you.
11
.. image:: images/workflows_localcommit.png
16
If you're working in a checkout and need/wish to commit locally only,
17
add the ``--local`` option to the ``commit`` command like this::
21
Being disconnected for long time periods
22
----------------------------------------
24
If you will be or want to be disconnected from the bound branch for
25
a while, then remembering to add ``--local`` to every ``commit`` command
26
can be annoying. An alternative is to use the ``unbind`` command to
27
make the checkout temporarily into a normal branch followed by the
28
``bind`` command at some later point in time when you want to
29
keep in lockstep again.
31
Note that the ``bind`` command remembers where you were bound to
32
last time this branch was a checkout so it isn't necessary to enter
33
the URL of the remote branch when you use ``bind`` after an earlier
36
Merging a series of local commits
37
---------------------------------
39
When you make commits locally independent of ongoing development
40
on a central branch, then Bazaar treats these as two lines of
41
development next time you ``update``. In this case, ``update``
44
* it brings the latest revisions from the bound branch down and
45
makes that the mainline of development without your checkout
47
* it moves your local changes since you last updated into a logical
50
* it merges these together so that your local changes are reported
51
as a pending merge by ``status``.
53
As always, you will need to run ``commit`` after this to send your
54
work to the central branch.