Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

4.5 Committing Changes

Now that you've made some changes to the project, it's time to commit those changes back to the repository. This is done with the svn commit command, as follows.

$ cd my_repos_trunk/
$ svn commit --message "Changed program output"
Sending        hello.c
Transmitting file data .
Committed revision 2.

When you run the commit command, Subversion sends the changes you have made to the repository, where a new revision is created with the changes applied to the files in the repository. As soon as the commit is complete, other users are able to update their own working copies of the repository and retrieve the updates that you have just committed.

As you can see, the output from the commit command says that Subversion committed revision two. This is the global revision number of the repository. Whenever any user commits a change to the repository, Subversion increments the revision number of the entire repository by one. This way, you are always able to refer to a snapshot of the repository at a given point in time, using the revision number. Unlike CVS, there is no need to remember that revision 10 of file A was matched with revision 15 of file B.

  • + Share This
  • 🔖 Save To Your Account