开发者

svn doesnt commit my added files?

开发者 https://www.devze.com 2022-12-25 07:31 出处:网络
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:

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 fil开发者_运维技巧es, not adding new ones. How come? I want it to add new files to the repository.


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....

svn doesnt commit my added files?


(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.

svn doesnt commit my added files?


(source: tigris.org)

For netbeans, see here

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


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.


svn add yourfile
svn commit yourfile
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号