Upstream and Tracking
A tracking branch knows its remote counterpart so status can show ahead and behind.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git init -q --bare ../r.git && git remote add origin ../r.git && git push -q -u origin main
echo two >> a.txt && git commit -qam 'local'
git status -sb | head -n 1Result
## main...origin/main [ahead 1]
Exercise
Short with branch.
git status Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.