20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

見やすいgit-grep

Last updated at Posted at 2012-07-03
.zshrc
alias gg="git grep -H --heading --break"
.gitconfig
[grep]
  lineNumber = true

git-grep

  • -Hでファイル名を相対パスにする
  • --headingでファイル名をヒットした行の上にまとめて表示する
  • --breakで空行を入れる
  • git config --global grep.lineNumber trueと打つと、デフォルトでヒットした行数を表示する

訂正

  • -Hはフルパスじゃなくて相対パスでした(manの英語がわかりにくい
20
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?