0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?