Show Recent Commits Practice
Fill in the BlankEasy
Question
Fill in the blank to show only the 3 most recent commits.
Code
git log -___ 3
Hint
The flag is a single letter that stands for 'number'.
Explanation
The -n flag (or --max-count) limits the number of commits git log displays. Running git log -n 3 shows only the 3 most recent commits. You can also use the shorthand git log -3 — Git interprets a bare number as -n with that value.
Related Resources
Related Lessons
- git log
Learn about git log flags and options.
Related Cheatsheets
- Git Cheatsheet
Quick reference for git log options.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.