Skip to content

Instantly share code, notes, and snippets.

@lcomino
Created April 29, 2019 12:07
Show Gist options
  • Save lcomino/26d0a38a5a4d6e0f2df87cf1625802d8 to your computer and use it in GitHub Desktop.
Save lcomino/26d0a38a5a4d6e0f2df87cf1625802d8 to your computer and use it in GitHub Desktop.
#!/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