使用 SVN 并处理同一文件 [英] Using SVN and Working on Same File

查看:58
本文介绍了使用 SVN 并处理同一文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用 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.

推荐答案

让我们从头开始:

  1. 在服务器机器上安装一个 subversion 服务器
  2. 设置存储库
  3. 为用户设置访问权限
  4. 每个用户在他的工作站上安装一个 Subversion 客户端
  5. 将您的项目导入存储库(初始提交)

  1. Install a subversion server on the server machine
  2. Setup a repository
  3. Setup users an access rights for them
  4. Each user installs a subversion client on his workstation
  5. 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 快速入门

svn 服务器 (linux)

svn 服务器和客户端(Windows)

svn 命令行客户端

这篇关于使用 SVN 并处理同一文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆