Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Introduction to Git First Commits File Status

Lahari Sirigineedi
Lahari Sirigineedi
6,961 Points

Run the "git diff" command again, but this time add the option that will show you the staged changes. (When you have the

Run the "git diff" command again, but this time add the option that will show you the staged changes. (When you have the command right, changes to both the file that was previously tracked and the file that was previously untracked will be shown.)

2 Answers

From the course material of the lesson "Viewing Changes to a File":

"...there's a command line option that will show you staged changes if you specify it: git diff --staged. With the --staged option, git diff will compare your staged changes against the previous commit."

That should help! :-)

Happy coding!

Nils

PS: You can upvote my post and / or mark it as "best answer" if it helped you. :-)

Hi Nils, Just re-completed the challenge and discovered that it was a mere spacing issue

Answer: git diff --staged