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