Thursday, February 25, 2016

distributed version control system with bazaar/bzr

bazaar/bzr is easy to use distributed version control system  that is powerful, friendly, and scalable. Bazaar  keeps  track  of  changes  to  software source code (or similar information); lets you explore who changed it, when,  and  why;  merges concurrent changes; and helps people work together in a team

+ stand alone:
$ sudo apt-get install bzr

- set your identity
$ bzr whoami "user1 <>"

- start repository
$ bzr init-repo firstproject
$ bzr init firstproject/trunk

- general operation
$ cd firstproject/trunk
$ echo hello > test.txt
$ bzr add test.txt
$ bzr commit -m "add the first file" 

- view log and status of the repo
$ bzr status
$ bzr log

+ use bzr  as server/client  
- on server run
$ bzr serve --allow-writes --port=31234 --directory=~/firstproject/

- on client create same directory structure as server
$ bzr whoami "user2 <>"
$ mkdir firstproject
$ bzr init firstproject/trunk
$ cd  firstproject/trunk

- pull from server
 $ bzr pull bzr://

- now you can add file, edit file and after you commit you can also push to server
$ bzr push bzr://

bazaar bzr ubuntu

No comments:

Post a Comment