LoginSignup
0
0

More than 1 year has passed since last update.

【Git】git diff の使用方法

Posted at

リモートとの差分

$ git diff HEAD..リモート名/ブランチ名
$ git diff リモート名/ブランチ名..HEAD

直近のコミットの差分

git diff HEAD^..HEAD

ブランチ間の差分

git diff ブランチA..ブランチB

コミット間の差分

git diff 変更前のSHA..変更後のSHA

特定のファイルの差分

git diff -- ファイルパス
git diff ブランチA..ブランチB -- 対象のファイルパス

ファイル名のみ出力

git diff --name-only
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