eyalgo
9/18/2017 - 11:18 AM

rebase-feature-to-master.sh

#!/bin/sh

if [ -z "$1" ]
then
  echo "Branch name is missing"
else
  # Go to relevant branch
  git checkout $1

  # fetch everything
  git fetch

  #rebase interactive
  git rebase -i origin/master

fi
# See https://git-scm.com/docs/git-rebase