Book Image

Bazaar Version Control

By : Janos Gyerik
Book Image

Bazaar Version Control

By: Janos Gyerik

Overview of this book

<p>Bazaar is a version control system that enables you to track your changes, browse the history of revisions, or revert to a previous state with ease. You can benefit greatly from the principles and practical uses of version control with Bazaar in any software project.<br /><br />This book will walk you through the principles and basic and advanced operations of version control, taking a step-by-step approach covering increasingly complex topics and situations of collaboration. Packed with examples, the book aims to give you a thorough understanding of the subject in order to get you fully comfortable using this powerful, highly intuitive and consistent tool in any project and workflow thrown at you.<br /><br />The book starts by introducing the fundamentals of version control to first-time users. After explaining the basic principles, we dive into action covering the various operations and workflows of version control using Bazaar. Topics are covered in increasing order of complexity from solo mode, peer-to-peer, centralized-style, and ultimately distributed-style. The book also covers advanced subjects such as integration with collaborative environments and other version control systems, as well as using Bazaar programmatically and creating plugins. This book will help you gain solid knowledge about version control and enable you to use Bazaar effectively in your projects.</p>
Table of Contents (17 chapters)
Bazaar Version Control
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Undoing commits


You can undo one or more of the most recent commits by using the uncommit operation. This can be useful, for example, if you want to amend your last commit by changing the log message or adjusting the set of changes to include. The uncommit operation moves the branch tip marker one or more revisions back, without changing the working tree, so that you can make any necessary adjustments and commit again.

To see how it works, let's grab a sample branch:

$ bzr branch lp:~bzrbook/bzrbook-examples/uncommit /tmp/uncommit
Branched 6 revisions. 

You can undo the last commit by using the bzr uncommit command without any parameters:

$ cd /tmp/uncommit/
$ bzr uncommit
    6 Janos Gyerik      2013-04-20
      changes just to demonstrate shelving

The above revision(s) will be removed.
Uncommit these revisions? ([y]es, [n]o): yes
You can restore the old tip by running:
  bzr pull . -r revid:janos@axiom-20130420203136-bi9iglm2cevc8tfq

Bazaar shows the short log message of the revisions...