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'
21 git push --tags $remote 2>&1 | grep -v 'Everything up-to-date'
23 # Show unmerged changes.
24 git branch -rv --color --no-merged
25 # Show uncommitted changes.
26 if `echo "$1" | grep '\.git\$' > /dev/null`; then
29 git status | grep 'Changes to be committed:' > /dev/null \
30 && echo '-> modified (staged)'
31 git status | grep 'Changed but not updated:' > /dev/null \
33 git status | grep 'Untracked files:' > /dev/null \
34 && echo '-> modified (untracked)'