Skip to content

Instantly share code, notes, and snippets.

@masatomo
Created August 2, 2012 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save masatomo/3236060 to your computer and use it in GitHub Desktop.
Save masatomo/3236060 to your computer and use it in GitHub Desktop.
feature_branch() {
if [ "${1}" = "" ]; then
echo "${0} <new feature branch name>"
return
fi
branch_name="`date '+%d%m%y'`_${1}"
git co -b ${branch_name} master
git push
git branch --set-upstream ${branch_name} origin/${branch_name}
git pull
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment