Learn Version Control with Git
)}

git diff

The git diff command allows you to see changes that have been made but haven't been committed.

open your project-1.txt file, erase "Random Message 1" and replace with "This is a git diff example"

your file should look something like this:

Let's say you forgot what changes were made in the past to that file, well we can view those changes with the following command:

git diff

The output above displays the changes that were made. it shows us the removal of "Random Message 1" in red and the addition of "This is a git diff example" in green.

let's create a commit to apply this change:

git add .
git commit -m "applied git diff"

Feedback Summary
5.0
3 students
5

100%
4

0%
3

0%
2

0%
1

0%
Written Reviews
There are no written reviews yet.