问题描述
我是使用 SVN 的新手.我们与 3 人一起从事嵌入式项目.当有人正在开发一个 c 库时,其他人正在开发另一个库.有一个 main.c,我们也在其中编写代码.我的问题是我们如何管理像 SVN 中的 main.c 这样的公共文件?我们需要这样做,因为我们都在同一时间一起工作.
I'm new on using SVN. We work on an embedded project with 3 people. While someone is developing a c library the other ones are developing another libraries. There is a main.c and we are also coding somethings in it. My question is how do we manage the common files like main.c in SVN ? We need to do this because we all work together at the same time.
推荐答案
让我们从头开始:
- 在服务器机器上安装一个 subversion 服务器
- 设置存储库
- 为用户设置访问权限
- 每个用户在他的工作站上安装一个 Subversion 客户端
将您的项目导入存储库(初始提交)
- Install a subversion server on the server machine
- Setup a repository
- Setup users an access rights for them
- Each user installs a subversion client on his workstation
Import your project into the repository (the initial commit)
svn import <repo-url>/trunk -m="initial commit MyProject"
每个用户现在签出一个工作副本
svn checkout --revision HEAD --depth infinity --force /trunk
现在您和您的朋友可以开始各自处理他的工作副本
.完成后 commit
对存储库的更改.
Now you and your friends can start working each on his working copy
. When done commit
your changes to repository.
svn commit -m "一些评论:修复了错误或一些东西"
要获取您朋友的更改,请执行 update
命令.
To get the changes of your friends execute an update
command.
svn update --revision HEAD <project-dir |一些文件>
最后,这里有一些您可能会感兴趣的链接:
Finally, here some links you might find interesting:
这篇关于使用 SVN 并处理同一文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!