开发者

Scanning for patterns in files modified under git

How do you scan for patterns on changed lines within a git repo?

I'm trying to find the pattern "<<<<<<<" in all files locally modified.

To do this I thought I'd output git's diff, which should show all changed lines, and then just do a grep, like:

git diff --diff-filter=d origin/master | grep -B 5 -A 5 '<<<<<<<'

However, instead of outputting a diff, this launches my meld (on U开发者_开发百科buntu), my local git difftool. How do I stop it from launching meld and make it simply output a diff?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜