Have you run your unit tests yet? If so, pass OK or a branch name, and try again
usage: git_push_new_branch {OK|BRANCH_NAME}
e.g.
git_push_new_branch.sh -> Displays prompt reminding you to run unit tests git_push_new_branch.sh OK -> Pushes the current branch as a new branch to the origin git_push_new_branch.sh MYBRANCH -> Pushes branch MYBRANCH as a new branch to the origin
) echo "$IT" exit }
if [ -z "$1" ] then show_help fi
CURR_BRANCH=$(git rev-parse --abbrev-ref HEAD) if [ "$1" == "OK" ] then BRANCH=$CURR_BRANCH else BRANCH=${1:-$CURR_BRANCH} fi
defparse_args(): parser = argparse.ArgumentParser(description='Push and set upstream for a branch') parser.add_argument('-r', '--remote', default='origin', help="The remote name (default is 'origin')") parser.add_argument('-b', '--branch', help='The branch name (default is whatever HEAD is pointing to)', default='HEAD') return parser.parse_args()