The main difference between distributed and centralized version control systems is that when you commit, you are committing to your local copy of the repository—effectively, to your own branch. In order to share your changes with others, there is an additional set of steps you need to perform. To do this, DVCSs have two new operations: pulling changes from a remote repository and pushing changes to it.
Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation by Jez Humble; David Farley
For example, here is a typical workflow on Bazaar:
- bzr pull —Get the latest updates from the remote repository.
- Write some code.
- bzr commit —Save your changes to your local repository
- bzr pull —Get any new updates from the remote repository.
- bzr merge —This will update your local working copy with the results of the merge, but will not check in the merge.
- bzr commit —This checks in the merge to your local repository.
- bzr push —Push your updates to the remote repository.