Skip to content

Instantly share code, notes, and snippets.

@eduardo-matos
Created March 28, 2013 14:24
Show Gist options
  • Save eduardo-matos/5263516 to your computer and use it in GitHub Desktop.
Save eduardo-matos/5263516 to your computer and use it in GitHub Desktop.
GIT: Update all remote tracking changes.
#!/bin/sh
# Usage: fetchall.sh branch ...
set -x
git fetch --all
for branch in "$@"; do
git checkout "$branch" || exit 1
git rebase "origin/$branch" || exit 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment