SVK::Help::Intro - Introduction to svk
svk is an open source distributed version control system which is designed to interoperate with Subversion. Like other version control systems, it keeps track of each change you make to a project and allows you to maintain multiple parallel tracks of development. svk also has a number of powerful features which are rarely found in other version control systems.
svk has been designed from the ground up to support development models that are simple and intuitive for software developers. It has advanced smart branching and merging semantics that make it easy to maintain multiple parallel lines of development and painless to merge changes across branches. svk's built in patch manager makes it easy for non-committers to share changes among themselves and with project maintainers
svk provides powerful support for distributed development. Every svk client is capable of fully mirroring remote Subversion repositories so that you have full access to a project's history at any time, even when they are off the network or on the wrong side of a firewall. You can branch a remote project at any point in that project's history, whether or not you have write access to that project's repository. Later, you can integrate changes from the project's master server (usually with a single command) or push your branch up to another Subversion repository.
svk has a rich command line interface that can be somewhat daunting at first. the following few commands are all you'll need for day to day operation.
- svk mirror
First, you'll need to mirror a remote repository. This sets up a local copy of that repository for you to branch from, merge to and otherwise poke at. The local path is sometimes called a "depot path."
# This command sets up the mirror directory for your local # mirrors of remote repositories svk mkdir //mirror svk mirror svn://svn.example.com/project_x //mirror/project_x
- svk sync
When you've set up a new mirror or want to get some work done without a network connection, sync your local repository with upstream repositories.
svk sync //mirror/project_x
- svk copy
After that, it's easy to copy remote branches to create local branches. (svk branches are simply directories, just like Subversion branches.)
# This command sets up a directory for your local branches. # Local branches can't live inside mirrored paths svk mkdir //local svk copy //mirror/project_x //local/project_x
- svk checkout
When you want to get some work done, you can checkout a working copy to make local changes.
cd ~/svk-checkouts svk co //local/project_x
- svk add, svk delete and svk move
As you work on the files in your working copy, feel free to add new files, delete existing files and move files around.
cd ~/svk-checkouts/project_x svk add Changelog svk move badly_named_file.c well_named_file.c svk delete .README.swp
- svk commit
When you're done, just commit your changes to your local repository, whether or not you have network. If you commit to a mirrored path, rather than a local branch, you'll need to be able to access the path's upstream subversion server, but the commit will be sent to the server instantly.
- svk pull
Life doesn't stop when you make a local branch. From time to time, pull down changes from the upstream repository.
svk pull //local/project_x
- svk push
When you're ready to share your changes with the world, push them to the upstream repository.
svk push //local/project_x
To see a full list of svk's commands, type
svk help commands. For help with a specific command, just type
svk help command.
The svk wiki (http://svk.bestpractical.com) is a great place to find the latest svk tips, tricks and updates. If you run into trouble using svk, the wiki's the right place to start looking for help.