LoginSignup
0
0

More than 3 years have passed since last update.

git blameとgit log -pを使ってファイル編集履歴を見ながらコンフリ解消する

Posted at

ファイル編集履歴を見ながらコンフリ解消したい

 共同開発をするにあたって、コンフリを解消する際にどのように解消して良いかわからない時がある。
 そんな時、そのファイルを誰がいつ、どのように変更したか、またその変更に至るまでにどのようなコミット履歴があったのか、がわかればコンフリ解消の手掛かりになる。
 以下のコマンドでは、上記のコンフリ解消の手掛かりを得ることができる。

git blame

git blameでは、指定したファイルの各行が変更された最終コミットを知ることができる。

$ git blame file_path
コミットID (変更した人の名前    変更した日時  行番号)     コード

git log -p

 git log -p では、指定したファイルのコミットの履歴を見ることができる。

$ git log -p file_path
0
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
0
0