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

标签 git

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/

相关文章:

git - 如何在 Git 中使用(子)目录重命名?

python - 在 ubuntu 中运行 buildozer 时找不到 Git (git)

c# - Azure Git 部署找不到文件 [Project].dll.licenses 失败

git - 离线使用Git

git - 为什么我在 git fetch 后看不到 git 分支?

git - 如何从 Git 主分支中间删除一些提交?

JAVA和GIT如何管理外部资源。采取正确的技术

git - Maven-scm 插件 : Why is the scmRevision not working as expected?

git - 如何重新启动 git 项目并保留其历史记录?

git - git pull 和 git push 的不同默认远程(跟踪分支)