Chapter 2. Basic Usage

Chapter 2. Basic Usage

Table of Contents

Help!
Getting Data into Your Repository
svn import
Recommended Repository Layout
Initial Checkout
Disabling Password Caching
Authenticating As a Different User
Basic Work Cycle
Update Your Working Copy
Make Changes to Your Working Copy
Examine Your Changes
See an overview of your changes
Examine the details of your local modifications
Undoing Working Changes
Resolve Conflicts (Merging Others' Changes)
Viewing conflict differences interactively
Resolving conflict differences interactively
Postponing conflict resolution
Merging conflicts by hand
Discarding your changes in favor of a newly fetched revision
Punting: Using svn revert
Commit Your Changes
Examining History
Generating a List of Historical Changes
Examining the Details of Historical Changes
Examining local changes
Comparing working copy to repository
Comparing repository revisions
Browsing the Repository
svn cat
svn list
Fetching Older Repository Snapshots
Sometimes You Just Need to Clean Up
Disposing of a Working Copy
Recovering from an Interruption
Dealing with Structural Conflicts
An example Tree Conflict
Summary

Now we will go into the details of using Subversion. By the time you reach the end of this chapter, you will be able to perform all the tasks you need to use Subversion in a normal day's work. You'll start with getting your files into Subversion, followed by an initial checkout of your code. We'll then walk you through making changes and examining those changes. You'll also see how to bring changes made by others into your working copy, examine them, and work through any conflicts that might arise.

Note that this chapter is not meant to be an exhaustive list of all of Subversion's commands—rather, it's a conversational introduction to the most common Subversion tasks that you'll encounter. This chapter assumes that you've read and understood Chapter 1, Fundamental Concepts and are familiar with the general model of Subversion. For a complete reference of all commands, see Chapter 9, Subversion Complete Reference.