如何维护开发环境中心的基本文件,同时允许人们更改其本地副本

发布于 2024-08-30 23:37:41 字数 423 浏览 2 评论 0原文

我想做的是将文件放在一个中心位置,这样当我将人员添加到我的开发团队时,他们可以看到这些文件的基本版本,但同时团队的其他成员能够使用他们自己的本地文件版本。 我知道我可以将文件放入源代码管理中(我们使用 Tortoiese-SVN)并让我的团队更改本地版本,但我不想用感叹号来表示文件已更改并且需要提交,相当坦白说,这让我非常恼火。 我将举两个例子来说明我的意思:

  1. 我们使用相当多的 build.xml 文件,这些文件与包含许多定义的单个属性文件相关。其中一些在团队成员之间可能有所不同(主要是临时工作目录),我希望新的团队成员能够使用基本配置获取属性文件,但如果他们愿意,可以更改它。
  2. 将 Eclipse 设置文件保存在 SVN 中,以便当新的团队成员加入时,他们可以从服务器检索文件并运行基本系统。如果他们愿意,他们将能够更改其中一些设置。

谢谢, 一泰

what I'd like to do is have files in a central location so that when I add people to my development team they can see the base version of these files but meanwhile have the ability for the rest of the team to work with their own local version.
I know I can just put the files in source-control (we use Tortoiese-SVN) and have my team change the local versions but I'd rather not as the exclamation mark signaling the file has been changed and needs to be committed, quite frankly, irritates me greatly.
I'll give two examples of what I mean:

  1. We use quite a few build.xml files which relate to a single properties files which contains many definitions. Some of them can be different between team-members (mainly temporary working directories) and I'd like a new team-member to have the ability to get the properties file with the base config but change it if they wish.
  2. Have the eclipse settings file in the SVN so that when a new team-member joins they can just retrieve the files from the server and have a base system running. If they wish they will be able to change some of these settings.

Thanks,
Ittai

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回忆追雨的时光 2024-09-06 23:37:41

我过去所做的是将文件放在不同的位置或在存储库中使用不同的名称,并使用 ignore real_file 规则,以便颠覆不会抱怨更改的文件,并且有一个将文件复制到具体位置的小脚本。

例如,.project Eclipse 项目文件可以在存储库中命名为 eclipse-project-default。当用户下载本地副本时,他们运行脚本并获得一个新的 .projecteclipse-project-default 的副本),他们可以更改该项目,并且不会显示在颠覆状态命令。

这种方法的问题在于,通常很容易对应该发送到中央存储库的文件进行更改并被遗忘。该方法需要更改实际文件,并对实际上传的配置文件应用相同的更改。然后提交该更改。

What I have done in the past is having the file in a different location or with a different name inside the repository with an ignore real_file rule so that the subversion will not complain on the changed file, and have a small script that will copy the files to the concrete location.

For example, the .project Eclipse project file can be named eclipse-project-default in the repository. When a user downloads the local copy they run the script and they get a fresh .project (copy of eclipse-project-default) that they can change and will not show in the subversion status command.

The problem with this approach is that it is often easy to make a change to the file that should go to the central repository and is forgotten. The approach requires changing the actual file, and applying the same change to the config file that is actually uploaded. And then commit that change.

ζ澈沫 2024-09-06 23:37:41

正如您所指出的,这确实是版本控制的一个案例,但我想您可以将一个副本放入中央文件服务器中,并让他们从其下载。您甚至可能希望将其设为只读文件或目录。

如果状态指示器让您感到困扰,您可以设置版本控制系统忽略该文件。

This really is a case for version control as you point out, but having said that I guess you could put a copy in a central file server and have them download it from their. You may even want to make this a read only file or directory.

If the status indicator bugs you that much you can set this file to be ignored by your version control system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文