1
0

More than 3 years have passed since last update.

git blame の表示範囲を絞り込む

Posted at

git blameは指定されたファイルの行ごとに、最後に変更したリビジョンの情報を表示するコマンド。

行範囲を指定する

-Lオプションで、特定の行範囲のみ、最後に変更したリビジョンの情報を表示する。

# ファイルの10行目から終わりまで表示する
$ git blame -L 10 example.txt
# ファイルの先頭から10行目まで表示する
$ git blame -L ,10 example.txt
# ファイルの5行目から10行目まで表示する
$ git blame -L 5,10 example.txt
1
0
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
1
0