Typically git status
shows:
- Current branch name (or detached HEAD status)
- Whether upstream branch (if any) is ahead, behind or diverged
- Changed staged for commit
- Changes not staged for commit
- Untracked files
How do I view only 1 and 2 without information about files? git status
's options typically affect display of files and trying to make it shorter typically removes branch status summary altogether.
I expect to see something like this:
On branch mybranch
Your branch is behind 'origin/mybranch' by 7 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
without anything else.
Is there some git command that shows specifically this info?
You can make a git alias or a shell script from that.