#!/bin/bash

echo -n "Branch name: "
read name

echo -n "Based on branch: "
read base

echo -n "Create the branch \"$name\" based on \"$base\"? [y/n] "
read answer

if [[ "$answer" != "y" ]]
then
    exit;
fi

git branch $name $base
git checkout $name
git push origin origin:refs/heads/$name

#!/bin/bash

echo -n "Branch name: "
read name

echo -n "Based on branch: "
read base

echo -n "Create the branch \"$name\" based on \"$base\"? [y/n] "
read answer

if [[ "$answer" != "y" ]]
then
    exit;
fi

git branch $name $base
git checkout $name
git push

Update the script to create a remote branch
Update the script to create a remote branch
