How do I check whether the remote repository has changed and I need to pull?
Now I use this simple script:
git pull --dry-run | grep -q -v \'Already
Here's my version of a Bash script that checks all repositories in a predefined folder:
https://gist.github.com/henryiii/5841984
It can differentiate between common situations, like pull needed and push needed, and it is multithreaded, so the fetch happens all at once. It has several commands, like pull and status.
Put a symlink (or the script) in a folder in your path, then it works as git all status
(, etc.). It only supports origin/master, but it can be edited or combined with another method.