From the course: Git Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Edit a file and view changes

Edit a file and view changes

From the course: Git Essential Training

Edit a file and view changes

- [Instructor] In the previous chapter, we added new files to our Git repository, both locally and remote. But one of the great things of Git is that it can help you keep track of changes in files. The good news is that committing a change to a file is pretty much the same process as committing a new file. Let's see how that works. So here I have the files we had worked with. I'm going to add a change to this file. I'm going to add an extra line and I'll save that. Now I'll move back to Git and I can do the same thing as with a new file. So I'll use Git add, and I'll use a dot for every file and then git commit -m and a commit message. A new snapshot has been created of my file in the Git repository and I will be able to view those changes and see what was changed. But what's going to happen if I want to actually see what I'm about to commit and what changes have been made, it's easy to keep track now because we only have…

Contents