我们有一个大项目的资源。我和我的同事在这个项目中只处理了几个文件,我们不想把它都放在版本控制之下。我和我的同事在我们的机器上有项目的本地副本。我执行以下命令修改并提交了副本中的几个文件:
svn add --non-recursive folder1/folder2
svn add folder1/folder2/file1.txt
svn ci -m "Message"之后,我的同事更新了他的项目,并收到错误:
svn: Failed to add directory 'folder': an unversioned directory of the same name already exists有没有可能以某种方式解决这个问题。我们不想把整个项目置于版本控制之下。
发布于 2012-05-16 17:03:36
使用svn up --force。下面是svn up --help的一句话
If --force is used, unversioned obstructing paths in the working
copy do not automatically cause a failure if the update attempts to
add the same path. If the obstructing path is the same type (file
or directory) as the corresponding path in the repository it becomes
versioned but its contents are left 'as-is' in the working copy.
This means that an obstructing directory's unversioned children may
also obstruct and become versioned. For files, any content differences
between the obstruction and the repository are treated like a local
modification to the working copy. All properties from the repository
are applied to the obstructing path. Obstructing paths are reported
in the first column with code 'E'.发布于 2012-05-16 17:01:29
您可以提交项目的主干,并让svn忽略您不希望在版本控制下使用的文件和文件夹。
这样,您希望协作工作的所有文件都将可用,仅此而已。
https://stackoverflow.com/questions/10615041
复制相似问题