#!/bin/sh set -e # bail on errors CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) REMOTE="${1:-$(git config --get branch.${CURRENT_BRANCH}.remote)}" BRANCH="${2:-$CURRENT_BRANCH}" git update "$REMOTE" develop git checkout develop git merge --no-ff "$BRANCH" git push git checkout "$BRANCH" git push -u "$REMOTE" "$BRANCH"