Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created March 17, 2010 15:42
Show Gist options
  • Save jhsu/335368 to your computer and use it in GitHub Desktop.
Save jhsu/335368 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
remote=$1; branch=$2
if [[ -n "$remote" && -n "$branch" ]]; then
git push $remote $branch
git branch --set-upstream $branch $remote/$branch
else
echo "Usage:"
echo " git pt <remote> <branch>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment