* 親コミットを確認 [#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。
- この場合は、abc1234(HEAD)の親コミットは、xxx999 と yyy0000。
- それぞれの親コミットは以下のように確認する。

 git show --name-only HEAD^1     # 上の例でのxxx9999の内容
 git show --name-only HEAD^2    # 上の例でのyyy0000の内容
 
 git show --name-only HEAD^1^ # 上の例でのxxx9999の親コミットの内容)

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

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS