gpt4 book ai didi

Git 差异 : how to do the opposite of -G?

转载 作者:太空狗 更新时间:2023-10-29 13:26:35 26 4
gpt4 key购买 nike

Git-diff 有一个选项 -G,它使用正则表达式来匹配差异。

如何反其道而行之? IE。查找添加或删除的行与给定正则表达式不匹配的差异?

最佳答案

我不认为您可以使用正则表达式来实现这一点。解决方法是:

diff <(git diff) <(git diff -G <regex>)

关于Git 差异 : how to do the opposite of -G<regex>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20426770/

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