svn - 有没有办法在TortoiseSVN中提交文件 "partially"?

标签 svn tortoisesvn

我想使用 TortoiseSVN 提交文件的一部分,有什么方法可以做到这一点吗?

我将举一个例子来更清楚地说明我为什么要这样做。

我有一个文件,其中包含一些在构建过程中被替换的定义,如下所示:

#define SOME_PATH "[SOME_PATH]"

这个 [SOME_PATH] 标签在构建过程中被替换,但是当我编码时,我必须更改它,以便我的机器中的实际路径。

所以每次我提交时,我都需要备份一些行,恢复它们,提交然后恢复备份,这有点烦人。

是否有某种方法可以告诉 TortoiseSVN“忽略”X、Y 和 Z 行中的某些更改?

最佳答案

得票最高的答案已过时。

摘自tortoiseSVN网站:http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-commit.html

Commit only parts of files

Sometimes you want to only commit parts of the changes you made to a file. Such a situation usually happens when you're working on something but then an urgent fix needs to be committed, and that fix happens to be in the same file you're working on.

right click on the file and use Context Menu → Restore after commit. This will create a copy of the file as it is. Then you can edit the file, e.g. in TortoiseMerge and undo all the changes you don't want to commit. After saving those changes you can commit the file.

After the commit is done, the copy of the file is restored automatically, and you have the file with all your modifications that were not committed back.

关于svn - 有没有办法在TortoiseSVN中提交文件 "partially"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/314132/

相关文章:

svn - 哪些 Subversion Web 界面具有指责功能?

c# - 使用 $Rev :$ SVN keyword in C# code?

permissions - 乌龟SVN : Setting different permissions for sub folders

比服务器更高版本的 SVN 客户端

tortoisesvn - SVN 服务器托管公司关闭,我需要一个存储库备份

svn - 在tortoisesvn中更改文件树

svn:无法打开文件 '.svn/lock':MAC 上的权限被拒绝

java - 如何在WebApp中像Diff一样构建SVN/Git?

svn - Jenkins 不会在 SCM (SVN) 外部项目变更上触发构建

svn - Resharper和TortoiseSVN