Files
30-seconds-of-code/snippets/git/s/view-differences.md
2023-05-07 16:07:29 +03:00

672 B

title, type, language, tags, author, cover, dateModified
title type language tags author cover dateModified
View differences in changes snippet git
commit
branch
chalarangelo plant-candle 2021-04-13T21:10:59+03:00

Displays differences between staged or unstaged changes and the last commit.

  • Use git diff to view differences between your unstaged changes and the last commit.
  • You can use the --staged option to view differences between your staged changes and the last commit instead.
git diff [--staged]
git diff
# Displays the differences between unstaged changes and the last commit

git diff --staged
# Displays the differences between staged changes and the last commit