3 # Push current commits to all remotes and fetch from all remotes. Then display
4 # unmerged commits and changes in the repositories.
6 # If an argument is given cd to this directory before running the commands.
8 # Very useful to sync multiple remotes.
16 # Get all remote changes.
17 git remote update 2>&1 | grep -v Fetching
18 # Push all local changes to remote(s).
19 for remote in `git remote`; do
20 git push $remote 2>&1 | grep -v 'Everything up-to-date'
22 # Show unmerged changes.
23 git branch -rv --color --no-merged
24 # Show uncommitted changes.
25 if `echo "$1" | grep '\.git\$' > /dev/null`; then
28 git status | grep 'Changes to be committed:' > /dev/null \
29 && echo '-> modified (staged)'
30 git status | grep 'Changed but not updated:' > /dev/null \
32 git status | grep 'Untracked files:' > /dev/null \
33 && echo '-> modified (untracked)'