Skip to content

Instantly share code, notes, and snippets.

@alexeypegov
Created October 16, 2013 16:47
Show Gist options
  • Save alexeypegov/7011012 to your computer and use it in GitHub Desktop.
Save alexeypegov/7011012 to your computer and use it in GitHub Desktop.
Quickly create Git remote branch. Place it somewhere in the PATH and call like this: "git rbr branch_name"
#!/bin/sh
if [ -n "$1" ]; then
git checkout -b $1
git push --set-upstream origin $1
else
echo "Usage: git rbr branch-name"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment