QuestionQ89

VerifiedSoftware Development and Design

A file in a local Git repository has been updated, and the git add . command has been issued. The git diff command has been run to compare the changes with the prior commit, but it displays nothing. Which action identifies the problem?

Explanation

A plain git diff shows unstaged differences between the working tree and the staging area. After git add ., the changes are staged, so git diff --staged is required to compare the staging area with the latest commit (HEAD).

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!