In Git, I’d like to be able to see, at a glance, whether my repository and working directory are out of date. I often make the mistake of just running “git status” – but that doesn’t do any remote communication at all. Or, I’ll do this:
git fetch --all
git status
But that doesn’t show activity on other branches.
What’s a good, convenient way to get information like:
- Are there updates to this branch in any remote repository?
- Are there updates to any parent branch?
- Have any new branches been made – who by, etc.
You can’t get “who by” since branch creation is not actually recorded anywhere. (You can find who owns the most recent commits on a given branch, but, e.g., if the branch was created as synonymous with another branch, the commits often have nothing to do with “who created it”. For instance if I do
git push origin master:newbranchthen the branch I just created on the remote has, as its most recent commit, the same most-recent commit asmaster, which is not necessarily “mine”.)The output from
git fetch --alldoes show activity by default, though. For instance:This says that I’ve just updated my idea of rohan/master based on stuff I brought over from the remote I named “rohan”. Nothing was updated in origin/*.