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


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"

Jul 112011

Remove added files using svn add


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


# svn revert file.txt

Jun 292011

How to revert a bad commit in SVN


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 
# svn commit -m "Reverting previous bad commit and going back to revision 98"
Jun 232011

Import files and directories into a SVN repository


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


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