General Information
Subversion (svn) is a “free/open-source version control system”.
Checklist
Create a working directory space.
Checkout creates a local copy of the repo.
Checkout command
svn checkout URL
Shortcut
svn co URL
Make changes to a repo.
Update changes from the repo to your local copy.
svn update
Add a new file/directory to the repo. New file only gets pushed to the repo copy upon commit.
svn add mynewfile
svn commit -m "Adding a new file to the project." mynewfile
Delete a file from the working copy. The file will be removed from the repo upon commit.
svn delete mynewfile
svn commit -m "removing mynewfile." mynewfile
Move or rename a file. File is changed in the repo upon commit.
svn move oldfilename newfilename
svn commit -m "Renaming my file" newfilename
A commit saves changes to the repo.
Commit command
svn commit -m "my changes description"
Keep your working directory clean by listing and/or removing untracked files.
List untracked files
svn status --no-ignore | grep '^?' | awk '{print $2}' | xargs -I{} ls -l '{}'
WARNING: The following could remove work in progress!
Remove untracked files
svn status --no-ignore | grep '^?' | awk '{print $2}' | xargs -I{} rm -fv '{}'
View status and logs.
Show the differences between your working copy and the repo copy.
svn diff myfilename
Show the status of the file(s) in the working copy.
svn status PATH
Show the character codes for various statuses
svn help status
View logged commits.
svn log PATH
View diff of a specific logged revision
svn log --revision r101 --diff