Using bzr

From Applied Optics Wiki
Revision as of 18:51, 28 January 2009 by Ral (talk | contribs) (Quick List of Commands)

Jump to: navigation, search

Official Tutorials

See http://doc.bazaar-vcs.org/bzr.1.11/ or more specifically http://doc.bazaar-vcs.org/bzr.1.11/en/tutorials/tutorial.html

Quick List of Commands

To see some help:

bzr help

To ensure that your commits have the correct name (run once before anything else):

bzr whoami "My Name <my.email@example.com>"

To create a new repository:

mkdir example
cd example
bzr init

To add a file to the repository (don't forget to commit the changes afterwards):

bzr add example.c

To commit changes to a file after modifying it:

bzr ci example.c

To commit changes to the whole repository:

bzr ci

To move/rename a file (don't forget to commit the changes afterwards):

bzr mv <old file> <new file>

To remove a file (don't forget to commit the changes afterwards):

bzr rm <file>

To see uncommited changes in the current repository/file:

bzr diff [filename]

To see the revision log:

bzr log [filename]

To see the current state of the repository:

bzr st
# or
bzr status

To ignore files so they aren't considered in "bzr st" and other commands (don't forget to commit the changes afterwards):

bzr ignore <filename>

To give a meaningful name to a revision (ie. to tag a particular released version):

bzr tag <tag name>

To create a copy of the repository:

bzr branch <existing repo> <new repo>

To merge changes from one repo to another:

cd my_repo
bzr merge /path/to/other/repo