作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是SVN的初学者。我具有SVN目录结构,如下所示:
|-trunk
|-file1.php
|-file2.php
|-branches
|-branch_1
|-file1.php
|-file2.php
|-branch_2
|-file1.php
|-file2.php
file1.php
目录中的
trunk
。我想将更改应用于所有分支中名为
file1.php
的文件。
Subversion's repository has a special design. When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an existing tree.
trunk\file1.php
文件中的更改时会自动将其附加到其他
file1.php
文件中,因为我没有对
branches
目录中的文件进行任何更改。
svn merge
:
svn merge -r 31:32 http://mysvnserver.com/project/branches/branch_1
svn diff -r 31:32
返回我所做的所有更改。)
最佳答案
如果要将更改从trunk更改为branch_1,则merge命令需要指定从何处获取差异,然后指定将合并应用于的目标:
cd branch_1
svn merge -r 31:32 http://mysvnserver.com/project/trunk .
svn diff # confirm that the only diff is your change to file1.php
svn commit
关于svn - SVN-如何将在主干中所做的更改应用于所有分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1645409/
我是一名优秀的程序员,十分优秀!