Skip to content

Instantly share code, notes, and snippets.

@kunitoo
Created November 4, 2011 08:28
Show Gist options
  • Save kunitoo/1338920 to your computer and use it in GitHub Desktop.
Save kunitoo/1338920 to your computer and use it in GitHub Desktop.
local,remoteにブランチを作成して移動する
#/bin/sh
if [ $# -ne 1 ]; then
echo "sh create_branch.sh 'branch_name'" 1>&2
exit 1
fi
git branch $1
git checkout $1
git push origin $1
git config --add branch.$1.remote origin
git config --add branch.$1.merge refs/heads/$1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment