git grep
ワークツリーのファイルをGrep検索するコマンド。
用例
- ワークツリー内で"hoge"という文字列をGrep検索
git grep hoge
- ワークツリー内で"hoge"という文字列をGrep検索(出現した行番号も表示)
git grep -n hoge
書式
git grep [options] <検索文字列>
公式によると以下の通り。
git grep [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp]
[-v | --invert-match] [-h|-H] [--full-name]
[-E | --extended-regexp] [-G | --basic-regexp]
[-P | --perl-regexp]
[-F | --fixed-strings] [-n | --line-number] [--column]
[-l | --files-with-matches] [-L | --files-without-match]
[(-O | --open-files-in-pager) [<pager>]]
[-z | --null]
[ -o | --only-matching ] [-c | --count] [--all-match] [-q | --quiet]
[--max-depth <depth>] [--[no-]recursive]
[--color[=<when>] | --no-color]
[--break] [--heading] [-p | --show-function]
[-A <post-context>] [-B <pre-context>] [-C <context>]
[-W | --function-context]
[--threads <num>]
[-f <file>] [-e] <pattern>
[--and|--or|--not|(|)|-e <pattern>…]
[--recurse-submodules] [--parent-basename <basename>]
[ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | <tree>…]
[--] [<pathspec>…]
options
| /x | xxx |
etc.
説明
ワークツリーのファイルをGrep検索するコマンド。
関連
- なし
参考リンク
- git grep - Gitコマンド虎の巻
- Git - git-grep Documentation
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
- xxxxxxxx?
その他メモ
なにかあれば。
