首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SVN:如何在一个文件夹中同时处理多个文件?

SVN:如何在一个文件夹中同时处理多个文件?
EN

Stack Overflow用户
提问于 2012-05-16 16:50:37
回答 2查看 78关注 0票数 1

我们有一个大项目的资源。我和我的同事在这个项目中只处理了几个文件,我们不想把它都放在版本控制之下。我和我的同事在我们的机器上有项目的本地副本。我执行以下命令修改并提交了副本中的几个文件:

代码语言:javascript
复制
svn add --non-recursive folder1/folder2
svn add folder1/folder2/file1.txt
svn ci -m "Message"

之后,我的同事更新了他的项目,并收到错误:

代码语言:javascript
复制
svn: Failed to add directory 'folder': an unversioned directory of the same name already exists

有没有可能以某种方式解决这个问题。我们不想把整个项目置于版本控制之下。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-05-16 17:03:36

使用svn up --force。下面是svn up --help的一句话

代码语言:javascript
复制
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'.
票数 1
EN

Stack Overflow用户

发布于 2012-05-16 17:01:29

您可以提交项目的主干,并让svn忽略您不希望在版本控制下使用的文件和文件夹。

这样,您希望协作工作的所有文件都将可用,仅此而已。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10615041

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档