0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 2
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
A Git repo is a (potentially very long) list of commits, where each commit represents the full state of the repository at a given point in time.
The git log command shows a history of the commits in a repository. This is what makes Git a version control system. You can see:
Each commit has a unique identifier called a "commit hash". This is a long string of characters that uniquely identifies the commit. Here's an example of mine:
5ba786fcc93e8092831c01e71444b9baa2228a4f
For convenience, you can refer to any commit or change within Git by using the first 7
characters of its hash. For mine, that's 5ba786f
.
Run the git log
command. You should see your commit. Notice that git log
(assuming the log is long enough) starts an interactive pager. You can scroll through the log with the arrow keys, and exit by pressing q
.
Next, run git log
again, but this time use the -n
and --no-pager
options to limit the maximum number of commits shown, and more importantly, to run it without the interactive pager. E.g.:
git --no-pager log -n 10
Run and submit the CLI tests.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run 865b32b2-1493-48aa-b32e-a1e7418bc609
Submit
bootdev run 865b32b2-1493-48aa-b32e-a1e7418bc609 -s
Run the CLI commands to test your solution.
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.