gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 06:42:43 29 4
gpt4 key购买 nike

我想使用 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/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com