SVN commit command

svntortoisesvn

I need to commit the folder after adding some new files to that folder. When I tried this in TortoiseSVN, it was working properly (committed successfully), but while trying this by using the svn commit command it did not commit the folder.

Steps I have followed are:

  1. Checkout the test folder from the repository, to D:\Test folder,
  2. Add some new files to that test folder,
  3. Commit that folder using svn.exe commit D:\Test -m "Added".

It was not committed. I have tried this in TortoiseSVN (right-click on that folder and click SVN Commit), and it committed successfully.

Best Answer

To add a file/folder to the project, a good way is:

First of all add your files to /path/to/your/project/my/added/files, and then run following commands:

svn cleanup  /path/to/your/project

svn add --force /path/to/your/project/*

svn cleanup  /path/to/your/project

svn commit /path/to/your/project  -m 'Adding a file'

I used cleanup to prevent any segmentation fault (core dumped), and now the SVN project is updated.