git status --short --branch

Category: Git - Core

git status --short --branch

Show compact status with branch and tracking info

Adding --branch to the short format puts the current branch and its upstream on the first line, like main...origin/main [ahead 2]. The remaining lines use two-column shorthand, XY, for staging and working-tree state. It is the compact status most people use day to day.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.