Take the 2-minute tour ×

By "every change" I mean TortoiseSVN's "Commit" button.
It removes the deleted files, adds new ones, and commit the changes.
At least these are the ones I know of, but there may be others as well.
(I just press "All" and push Commit in Tortoise.)

RabbitVCS is available for Linux, but the cli version's commit == svn commit.
Is there a small script or something that could imitate Tortoise's commit?

Environment is Linux with bash prompt. (SVN 1.7.5)

share|improve this question
RabbitVCS seems to work now, but I'm still interested in a shell script that would do the work. –  Shiki Apr 3 '13 at 0:18
add comment

2 Answers

up vote 0 down vote accepted

Go to the root of your working directory.

svn add . --force

(This recursively traverses your working directory and does an svn add on every file it finds that is not already under version control.)

Next do this:


(This runs svn status. The status command recursively gives a list of everything that has changed in the working directory. The weird sed command finds all the lines starting with "!" (which is how svn status indicates a deleted file.))

Now do:

svn commit

Not that I really advise doing this. It would be preferable to just use "svn rm oldfile" instead of "rm oldfile" as you are doing your modifications. The "svn add . --force" isn't so great either: it's going to check in all the temporary files and object files that you generate while testing. It would be better to just "svn add newfile" when you care about adding a new file.

I typically run "svn status -u" before every checkin to get a clear picture of what has changed in my working copy.

I found the answer for the svn rm part at: http://stackoverflow.com/questions/1265122/how-can-i-programmatically-detect-missing-files-in-tar-archive-and-delete-them-f?rq=1, which in turn credits http://geryit.com/blog/command-line-subversion-practices/.

share|improve this answer
Thank you! Well, Tortoise and Rabbit basically commit every change (updates, new files, deletions) if you choose to do so. For continuous backup, I use Dropbox. But having SVN is good stuff. –  Shiki Apr 4 '13 at 22:50
add comment

I Use & Schedule This Batch Script . It Working Well.

CD "MyPath"

for /f "usebackq tokens=2*" %%i in (`svn status ^| findstr /R "^\!"`) do (svn del "%%i %%j")

svn add * --depth=infinity --force 

svn commit . -m "My Message"
share|improve this answer
The question is tagged Linux but this answer applies to Windows. –  Kevin Panko Apr 15 at 14:44
add comment

Your Answer


