如何在SVN导入后提交更改?

如何在SVN导入后提交更改?,svn,Svn,我已经创建了一个项目,并使用了svn import。现在我想提交对文件的更改,如何做 我有空的~/.workspace/project/.svn/entries 如果我尝试svn提交,我会得到以下结果: $ svn commit src/dat/Win.java svn: '/home/st/.workspace/dat/src/dat' is not a working copy svn: Can't open file '/home/st/.workspace/dat/src/dat/.sv

我已经创建了一个项目,并使用了
svn import
。现在我想提交对文件的更改,如何做

我有空的
~/.workspace/project/.svn/entries

如果我尝试svn提交,我会得到以下结果:

$ svn commit src/dat/Win.java
svn: '/home/st/.workspace/dat/src/dat' is not a working copy
svn: Can't open file '/home/st/.workspace/dat/src/dat/.svn/entries': No such file or 
目录

…或只是
svn提交

$ svn commit
svn: Can't read file '/home/st/.workspace/dat/.svn/entries': End of file found
svn提交[路径文件]
通过svn commit--help

您可以使用“svn diff”查看您有哪些未完成的更改,并使用“svn commit”(提交所有更改)或“svn commit path/to/file1 path/to/file2”提交更改,仅提交对这些文件的更改。

如果不先签出存储库的本地副本,则无法提交更改

  • 使用以下命令将存储库签出到本地目录:

    svn checkout file:///path/to/repo
    
  • 做出改变
  • 运行以下操作以提交更改:

    svn commit
    

  • 在提交之前,您需要签出刚导入的文件的新副本。删除(或重命名)您的项目目录,然后执行
    svn签出[REPOSPATH]
    。 那么你有一份工作副本。在工作副本中更改文件后,可以使用
    svn commit


    请参阅SVN手册中的。

    SVN导入将未版本文件提交到存储库(在远程主机上)。完成此操作后,您需要使用将存储库签出到您自己的机器作为工作副本

    svn checkout http://some.repository.net/trunk/ /my/local/path/to/workingcopy
    
    这将签出从repo到您的机器的中继到文件夹/my/local/path/to/workingcopy。做些改变,然后去做

    svn commit -m "A comment telling what you did the which file"
    
    或者,如果您向工作副本中添加了一些文件,请执行以下操作:

    svn add /path/to/file /path/to/otherfile
    

    它将把目录及其所有子目录中的所有内容添加到工作副本中,最后

    svn commit -m "who did what why"
    
    svn add /path/to/file /path/to/otherfile
    
    svn add /path/to/dir --force
    
    svn commit -m "who did what why"