Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Aug 092011
 

Move a directory in a subversion repository

Answer:

To move a directory in a subversion repository, the method we used is very similar to rename a directory under an UNIX shell.

# svn move -m "Move a directory" http://example.com/svn/repos/demo/trunk/foo http://example.com/svn/repos/demo/trunk/bar

Jul 112011
 

Remove added files using svn add

Answer:

To remove files from committed into the SVN in the next commit if you have just added them using the svn add, you should use svn revert

e.g.

# svn revert file.txt

Jun 292011
 

How to revert a bad commit in SVN

Answer:

In SVN, if you have committed something wrong, how do you rollback it?

You cannot use the svn revert command since it has been commited, you need to do a merge instead

E.g. Rollback from current version to revision 98

# svn merge -r HEAD:98 http://example.com/svn/repos/demo/trunk 
# svn commit -m "Reverting previous bad commit and going back to revision 98"
Jun 232011
 

Import files and directories into a SVN repository

Answer:

To import files and directories into a SVN repository, you can use the svn import command.

E.g.

Import all files and directories under the current working directory "project1" to a local SVN repository

# cd /data/project1
svn import file:///data/svn/project1