Master Git's powerful inspection tools. Learn to view differences between files, explore commit history with advanced filters, and track changes line by line.
Set up a repository with multiple commits to practice inspection commands.
mkdir -p ~/git-practice/lesson-102
cd ~/git-practice/lesson-102
git init
echo "# Project Documentation" > README.md
git add README.md
git commit -m "Initial commit: Add README"
echo "## Installation" >> README.md
echo "npm install" >> README.md
git add README.md
git commit -m "Add installation instructions"
echo "function hello() { return 'Hello'; }" > app.js
git add app.js
git commit -m "Add hello function"
We're creating a repository with multiple commits and files. This gives us a realistic history to inspect using various Git commands.
You have a repository with 3 commits and 2 files (README.md and app.js).