gitファイル非難

GitLab 2.5 で導入されました

gitblameは、最終更新時刻、作成者、コミットハッシュなど、ファイル内の各行に関する詳細な情報を提供します。

Blameボタンはプロジェクト内の各ファイルにあります。

File blame button

Blame(非難)」ボタンを選択すると、記載された情報が表示されます:

Git blame output

UIでコミットにカーソルを合わせると、そのコミットの正確な日時が表示されます。

前のコミットのせい

GitLab 12.7から導入されました

特定の行の以前のリビジョンを表示するには、表示したい変更が見つかるまで、この変更より前の注釈を表示をクリックしてください:

Blame previous commit

関連git コマンド

コマンドラインからgit を実行している場合、同等のコマンドはgit blame <filename>です。例えば、ローカル・ディレクトリにあるREADME.md ファイルに関するblame の情報を見つけたい場合は、以下のコマンドを実行します:

git blame README.md

以下のような出力が表示され、コミット時刻がUTC形式で表示されます:

62e2353a (Achilleas Pipinellis     2019-07-11 14:52:18 +0300   1) [![build status](https://gitlab.com/gitlab-org/gitlab-docs/badges/master/build.svg)](https://gitlab.com/gitlab-com/gitlab-docs/commits/master)
fb0fc7d6 (Achilleas Pipinellis     2016-11-07 22:21:22 +0100   2)
^764ca75 (Connor Shea              2016-10-05 23:40:24 -0600   3) # GitLab Documentation
^764ca75 (Connor Shea              2016-10-05 23:40:24 -0600   4)
0e62ed6d (Mike Jang                2019-11-26 21:44:53 +0000   5) This project hosts the repository used to generate the GitLab
0e62ed6d (Mike Jang                2019-11-26 21:44:53 +0000   6) documentation website and deployed to https://docs.gitlab.com. It uses the

APIによるファイルの非難

この情報は、gitファイル blame REST APIからも取得できます。