Skip to content

Instantly share code, notes, and snippets.

@alexfu
Created Dec 9, 2020
Embed
What would you like to do?
#!/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