- See what changed but isn't staged yet
git diffLines starting with + were added and lines starting with - were removed. Press q to leave.
- See what is staged and will go into the next commit
git diff --staged - See the changes in one file
git diff -- src/app.js - See only which files changed
git diff --statShows each file with a count of lines added and removed, without the details.
Check it worked
- Check which files are staged and which aren't
git status
Undo it
- Take a file back out of the next commit
git restore --staged src/app.jsYour changes stay in the file. They just won't go into the next commit until you add them again.
- See what changed but isn't staged yet
git diffLines starting with + were added and lines starting with - were removed. Press q to leave.
- See what is staged and will go into the next commit
git diff --staged - See the changes in one file
git diff -- src/app.js - See only which files changed
git diff --statShows each file with a count of lines added and removed, without the details.
Check it worked
- Check which files are staged and which aren't
git status
Undo it
- Take a file back out of the next commit
git restore --staged src/app.jsYour changes stay in the file. They just won't go into the next commit until you add them again.
- See what changed but isn't staged yet
git diffLines starting with + were added and lines starting with - were removed. Press q to leave.
- See what is staged and will go into the next commit
git diff --staged - See the changes in one file
git diff -- src/app.js - See only which files changed
git diff --statShows each file with a count of lines added and removed, without the details.
Check it worked
- Check which files are staged and which aren't
git status
Undo it
- Take a file back out of the next commit
git restore --staged src/app.jsYour changes stay in the file. They just won't go into the next commit until you add them again.

New to commit? I explain it in plain English on Layman Terms.