Git Snippets

Adds Git snippets to
Icons/chart bar
Used 11 times
Created by
D Dale Zak


Run this command in your Rails app directory in the terminal:

rails app:template LOCATION=""
Template Source

Review the code before running this template on your machine.

inject_into_file '' do <<~EOF

#### Create Pull Request
ISSUE_NAME="123 Fixed A Bug"
BRANCH_NAME=$(echo $ISSUE_NAME | tr '[:upper:]' '[:lower:]' | tr '/' '-' | tr ' ' '-')
git checkout -b $BRANCH_NAME
git add .
git add -u
git commit -m "Fixed a bug for #123"
git push -u origin $BRANCH_NAME

#### Create Release Tag
TAG_NAME=`date "+%Y-%m-%d_%H-%M-%S"`
git tag -a $TAG_NAME -m $TAG_NAME
git push origin --tags

Sign up or Login to leave a comment.