Go to the directory you want to store the script and paste the followinf code. It will download the script and create an alias in your shell init script.
- Bash users should use
.bashrc
- Zsh users should use
.zshrc
SHELL_FILE=.bashrc
wget https://gist.githubusercontent.com/sgobotta/451c1491d8b4746e8b171439bc97ef33/raw/e8edd45557d4ba7b2256d68525d18bb65ad7564f/checkout-branch.sh
echo "alias co_br="/home/sann/Documents/scripts/misc/checkout_branch.sh" >> "~/$SHELL_FILE"
It just appends two strings and replaces spaces with hyphens
# co_br <issue_number> <issue_title>
co_br 420 "As a git user I want my script installed In order to spent less time typing"
# Output
Switched to a new branch '420-As-a-git-user-I-want-my-script-installed-In-order-to-spent-less-time-typing'