From the course: Learning Git and GitHub

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Differences

Differences

- [Instructor] Git gives you a lot of freedom to experiment with your code. And one of the features that can really help is showing the differences between files. Let's go back into our project and I'm going to go to this Read Me document and delete this last paragraph right here. Then I'll go ahead and save it and I'll do a git diff. Now this command is going to show you the difference between these two files. You can see that we have deleted and that's what this minus means right here, not only the paragraph but also this carriage return that was right here. Now let's go ahead and undo this and save it. Clear this out and we'll do a git diff again, there's no differences between those two. And if we do some more changes, let's go ahead and add a new folder. We'll call it docs. And I'm going to move all of my HTML documents onto that docs folder. Now let's try doing a git diff. Now it's showing us all the different…

Contents