Useful SVN commands

By | 2011/08/12

Merge commit to branch (from 2.19 -> context branch 2.20 for example):

svn merge -c 16015

Resolving conflicts:

svn resolve --accept mine-full data/css/game.css
svn resolve --accept working data/css/game.css

Updating to revision:

svn update -r 16206

Cloning repository:

svn co <target-directory>

Adding files:

svn add src/file.js src/file.php

Updating to concrete revision:

svn checkout -r <revision_number> file:///home/user/svn/project

Checkouting new repository with revision number:

svn checkout -r <revision_number> file:///home/user/svn project

Commiting stuff:

svn commit -m 'Use a class to print hello world'

Switching branch:

svn switch

Removing file:

svn delete file_or_dir_name

After that you have to do:

svn commit file_or_dir_name -m "Some description"

Listing files from repository:

svn ls

Informations about working directory:

svn info

Merging everything between current branch and the release1 branch:

svn merge file:///Users/uzza/svn/default_project_svn2/tags/release1

Merging commits between branches:

svn merge -c 13 file:///Users/uzza/svn/default_project_svn2/trunk