git status says which files changed. git diff says what changed, line by line:
bash
git difftext
diff --git a/app.js b/app.js
index 53719b5..e7b7ca8 100644
--- a/app.js
+++ b/app.js
@@ -1,4 +1,5 @@ ← where in the file
const shop = require("./shop");
const prices = require("./prices");
-shop.listen(3000); ← - a line removed
+shop.open("9 to 5"); ← + a line added
+shop.listen(8080);git diff shows changes you haven't staged. git diff --staged shows what is staged: exactly what the next commit will hold.
Someone left a debug line in app.js. Catch it before it's saved for good.
Objectives
- Remove the debug line from
app.js(keep the discount). - Commit both changes: the staged README and the discount.