Anonymous
Anonymous

Reputation: 699

SVN Add and Commit File using Command Line - Tortoise SVN

On my machine Tortoise SVN is installed. I wanted to add and commit files using command line. When I tried svn add --force /path/to/your/project/* command I am getting 'svn' is not recognized as an internal or external command error.

I also tried Tortoise commands:

TortoiseProc.exe /command:commit
                 /path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"
                 /logmsg:"test log message" /closeonend:0

TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0

TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"
                 /startrev:50 /endrev:60 /closeonend:0

It works but after hitting command SVN window will open. We need to click "OK" button manually.

Is there any way or commands to make automatically add and commit.

Upvotes: 0

Views: 1271

Answers (1)

Alex Korn
Alex Korn

Reputation: 41

I don't know, if it is still actual but since I had the same issue not long ago, I think it's better to share some experience.

First of all, TortoiseSVN is a GUI tool, you need to use "svn" commands. Install command line tool, if you didnt.

enter image description here

Second, try something like this:

@echo off
cd C:\path_to_your_files
svn add * --force
svn commit -m ""
pause

Command "add * --force" will add all files, then they will be committed with empty message.

Hope it might help.

Upvotes: 1

Related Questions