Skip to content

Instantly share code, notes, and snippets.

@gnue
Last active December 17, 2015 02:39
Show Gist options
  • Save gnue/5537425 to your computer and use it in GitHub Desktop.
Save gnue/5537425 to your computer and use it in GitHub Desktop.
git でブランチからブランチへ合流するサブコマンド
#!/bin/bash
die() {
echo "$@" 1>&2
exit 1
}
usage() {
die "Usage: $(basename $0) <from> [<to>]"
}
set -e
from=$1
to=${2:-develop}
[ -z "$from" ] && usage
git co $to
git merge --no-ff $from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment