More on #git
Your push can be rejected
since you might be working with
a bot/ person . action .. ( --force-with-lease)
on the same page at the same time or the same remote path and same branch or any such possibility ( unlikely but possible)
then your can
- see the diff bw remote & your local with
git remote branch:branch
or
git diff @{upstream-of-the-remote}
-- Basically when a tool has a feature in all cases for a purpose, you need know howto for any ambiguity which could arise out any sequence of those possible case.
There s no way to have it in advance
and hence a good or bad dev #UX or #repl are so important
eg --porcelain disables the summary's "helpful" habit of simplifying refs/heads in ways that make them ambiguous if you've made a mistake in your config.