Sobes.tech
Junior — Middle

How can you view local changes in the Git version control system?

sobes.tech AI

Answer from AI

To view local changes in Git, you can use the command:

git status

It shows which files are modified, which are staged (added to the index), and which are not.

To see specific changes in files, use:

git diff
  • git diff — shows changes in files that are not yet staged.
  • git diff --staged or git diff --cached — shows changes that are already staged and will be included in the next commit.

Thus, git status provides an overview, and git diff provides details on the changes.