/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
1
Starting a project
2
==================
3
4
Putting an existing project under version control
5
-------------------------------------------------
6
7
If you already have a tree of source code (or directory of documents) you
8
wish to put under version control, here are the commands to use::
9
10
  cd my-stuff
6622.1.24 by Jelmer Vernooij
More doc renames.
11
  brz init
12
  brz add
13
  brz commit -m "Initial import"
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
14
6622.1.24 by Jelmer Vernooij
More doc renames.
15
``brz init`` creates a ``.brz`` directory in the top level directory
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
16
(``my-stuff`` in the example above). Note that:
17
6622.1.24 by Jelmer Vernooij
More doc renames.
18
 * Breezy has everything it needs in that directory - you do
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
19
   **not** need to setup a database, web server or special service
20
   to use it
21
6622.1.24 by Jelmer Vernooij
More doc renames.
22
 * Breezy is polite enough to only create one ``.brz`` in the
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
23
   directory given, not one in every subdirectory thereof.
24
6622.1.24 by Jelmer Vernooij
More doc renames.
25
``brz add`` then finds all the files and directories it thinks
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
26
ought to be version controlled and registers them internally.
6622.1.24 by Jelmer Vernooij
More doc renames.
27
``brz commit`` then records a snapshot of the content of these
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
28
and records that information, together with a commit message.
29
30
More information on ``init``, ``add`` and ``commit`` will be provided
31
later. For now, the important thing to remember is the recipe above.
32
33
Starting a new project
34
----------------------
35
36
If you are starting a project from scratch, you can also use the recipe
37
above, after creating an empty directory first of course. For efficiency
38
reasons that will be explored more in later chapters though, it is a good
39
idea to create a repository for the project at the top level and to nest
40
a *main* branch within it like this::
41
7385.2.1 by Jelmer Vernooij
Rename init-repo to init-shared-repo.
42
  brz init-shared-repo my.repo
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
43
  cd my.repo
6622.1.24 by Jelmer Vernooij
More doc renames.
44
  brz init my.main
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
45
  cd my.main
46
  hack, hack, hack
6622.1.24 by Jelmer Vernooij
More doc renames.
47
  brz add
48
  brz commit -m "Initial import"
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
49
50
Some users prefer a name like *trunk* or *dev* to *main*. Choose
51
whichever name makes the most sense to you.
52
7385.2.1 by Jelmer Vernooij
Rename init-repo to init-shared-repo.
53
Note that the ``init-shared-repo`` and ``init`` commands both take a path as an
2977.1.3 by Ian Clatworthy
1st cut at the 'Personal version control' chapter
54
argument and will create that path if it doesn't already exist.
55