#!/bin/sh sha=`git rev-parse --short HEAD` user_name=`git config user.name | \ cut -d ' ' -f 1 | \ tr '[:upper:]' '[:lower:]'` branch_name="staging-$sha-$user_name" git checkout -b $branch_name git add -f Gemfile.lock git commit -m "Deploying $sha" git push --force staging $branch_name:master