never_had_a_name
never_had_a_name

Reputation: 93296

svn doesnt commit my added files?

I have checked out files from my svn repository to a local project folder.

then I add 1 file in the project folder. But when I run:

svn commit -m "added a file"

it doesn't commit anything! Only when I change the original files, not adding new ones. How come? I want it to add new files to the repository.

Upvotes: 1

Views: 2517

Answers (3)

Tom
Tom

Reputation: 45174

Try running svn add

From command line:

svn add  [newfiles]

first

Then

svn commit -m "added a file"

If you are using Tortoise svn (for windows), you need to right click the file(s) and choose TortoiseSVN->Add....

here
(source: tigris.org)

eclipse and netbeans data.

If you are using Subclipse (svn plugin for eclipse), when you try to commit, you'll see some checkboxes on the bottom part of the window. Any files with the + simbol there will be added + commited.

alt text
(source: tigris.org)

For netbeans, see here

alt text http://netbeans.org/images_www/articles/60/ide/vcs/versioning-window.png

Upvotes: 7

me_an
me_an

Reputation: 509

svn add yourfile
svn commit yourfile

Upvotes: 0

Michael Burr
Michael Burr

Reputation: 340456

SVN doesn't know that you've added a file unless you tell it with the svn add command. Rather it doesn't know that you want a new file added to the repository until you do that.

I think that they chose this method of working because there are often a lot of files in a workspace that aren't intended to be in the repository. This makes users be explicit about what should go in.

svn status will let you know about new files that haven't been marked for adding to the repository.

Upvotes: 4

Related Questions