As for commit and push, git status works.
git status
'Changes to be committed: ... blabla' -> do commit
'ahead of 'origin/master' by n commits blabla': this means it is at ahead -> do push
'up to date' & 'nothing to commit'. Then you need to check pull-status by
git remote show origin
If it shows '(local out of date)', local repo is at behind. -> do pull
In case of '(up to date)', it is at the same commit with remote (origin/master).
For the issue of 'origin/master' in local and real 'origin/master' in network, refer to this page.