Last active
December 17, 2015 02:39
-
-
Save gnue/5537425 to your computer and use it in GitHub Desktop.
git でブランチからブランチへ合流するサブコマンド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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