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
- [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
-
-
-
Understanding version control1m 53s
-
(Locked)
What is Git?2m 16s
-
(Locked)
Setting up Git4m 35s
-
(Locked)
Understanding Git environments5m 51s
-
(Locked)
Ignoring files4m 5s
-
(Locked)
Deleting and renaming files6m 8s
-
(Locked)
Differences4m 9s
-
(Locked)
Changing history12m 7s
-
(Locked)
Branches6m 13s
-
(Locked)
Merge conflicts10m 7s
-
(Locked)
Git stash and clean9m 27s
-
-
-
-
-