Basic Work Cycle
Subversion has numerous features, options, bells, and whistles, but on a day-to-day basis, odds are that you will use only a few of them. In this section, we’ll run through the most common things that you might find yourself doing with Subversion in the course of a day’s work.
The typical work cycle looks like this:
Update your working copy.
svn update
Make changes.
svn add
svn delete
svn copy
svn move
Examine your changes.
svn status
svn diff
Possibly undo some changes.
svn revert
Resolve conflicts (merge others’ changes).
svn update
svn resolve
Commit your changes.
svn commit
Update Your Working Copy
When working on a project with a team, you’ll want to update your working copy to receive any changes other developers on the project have made since your last update. Use svn update to bring your working copy into sync with the latest revision in the repository:
$ svn update U foo.c U bar.c Updated to revision 2.
In this case, it appears that someone checked in modifications to both foo.c and bar.c since the last time you updated, and Subversion has updated your working copy to include those changes.
When the server sends changes to your working copy via svn update, a letter code is displayed next to
each item to tell you which actions Subversion performed to bring your
working copy up to date. To learn what these letters mean, run
svn help update
.
Make Changes to Your Working Copy
Now you can get to work and make changes in your working copy. It’s usually most convenient ...
Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.