我正在尝试使用
添加部分提交git add -p
我选择了正则表达式选项
/ - search for a hunk matching the given regex
补丁包含这些行
+ AMFObject obj2;
+ AMFObjectProperty p;
+ AVal redirect;
但是git好像没有找到
search for regex? redirect
No hunk matches the given pattern
最佳答案
问题是这个补丁影响了多个文件。
我需要选择
d - do not stage this hunk nor any of the later hunks in the file
直到找到正确的文件,然后正则表达式才会起作用。
关于git 添加正则表达式示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13323507/