Skip to content

Instantly share code, notes, and snippets.

@alexfu
Created December 9, 2020 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexfu/48d8cd67ec6830af85a9619c8d33204c to your computer and use it in GitHub Desktop.
Save alexfu/48d8cd67ec6830af85a9619c8d33204c to your computer and use it in GitHub Desktop.
#!/bin/bash
# Creates a new named bugfix branch in the following format: bugfix/xyz
# $1 - Name of the branch
# $2 - Base branch
BRANCH_NAME=bugfix/$1
START_POINT=$2
git checkout -b $BRANCH_NAME $START_POINT
git commit -m "Initial $BRANCH_NAME commit." --allow-empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment