* 親コミットを確認 [#a20e1d3c]

 git show --name-only HEAD^    # 親コミットの内容を確認
 git show --name-only HEAD^^  # 親コミットの親コミットの内容を確認

** マージコミットの場合(親コミットが2つある) [#re160942]

 git show --name-only HEAD

 commit abc1234
 Merge: xxx9999 yyy0000
 Author: foo <foo@example.com>
 Date:   Tue May 29 17:00:00 2017 +0000

- Merge:が表示される。
- この場合は、abc1234の親コミットは、xxx999 と yyy0000。
- それぞれの親コミットは以下のように確認する。

 git show --name-only HEAD^1     # xxx9999の内容
 
 git show --name-only HEAD^2    # yyy0000の内容

** 参考 [#i5db327c]
https://git-scm.com/docs/git-show


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS