From the course: Git Essential Training
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
View commit history
From the course: Git Essential Training
View commit history
- [Instructor] We've talked about Git as a tool for tracking the history of our files, what has changed and when, but how do we actually see that history? That's where git log comes in. Let's move to our codespace. I will open up the terminal all the way, as that is where our focus will be. If we type git log in the command line, it shows us the commit history for this repository. Each entry includes a commit, a unique identifier called a checksum, the author's name, the date, and a commit message. You can see now why it's important to write clear, descriptive commit messages. Now, you notice that Git only shows a few commits at a time. You can press Spacebar to scroll down and see more. If you want to leave this view, simply press Q and you'll be back at the command front, ready to enter new commands. But git log does more than just show a list of commits. You can filter and explore history in different ways. Let's look at a few useful examples. First, if we want details about the…
Contents
-
-
-
-
-
-
-
(Locked)
Git status2m 24s
-
(Locked)
Edit a file and view changes4m 14s
-
(Locked)
Delete files1m 35s
-
(Locked)
Rename files2m 18s
-
(Locked)
Working with folders3m 5s
-
(Locked)
Undo your changes2m 20s
-
(Locked)
View commit history4m 5s
-
(Locked)
Go back in Git history1m 52s
-
(Locked)
Revert a commit1m 55s
-
(Locked)
Make use of the GUI of Visual Studio Code2m 51s
-
(Locked)
Challenge: Make a change and revert51s
-
(Locked)
Solution: Make a change and revert2m 22s
-
(Locked)
-
-