今日は Git コマンドの奥深さを感じた! 結構 Git には詳しい方だと自負していたけど,全然知らないことあるなーと痛感した. git show git show で「特定のブランチにあるファイル」や「特定のコミットでのファイル」を見ることができる.コロンを忘れずに! git show ${branch}:${file} git show ${commit}:${file} git checkout git checkout ${branch} ${file} で「特定のブランチにあるファイルをコピー」できる.今日活躍したコマンドだった.コミット単位なら git cherry-pick を使えば良いけど,コミット数が多かったりすると面倒だし,ファイル単位で操作することはできないので,そういうときに使える. git checkout ${branch} ${file} 関連記事 kakak