Skip to content

Instantly share code, notes, and snippets.

@ulfryk
Last active January 28, 2016 08:22
Show Gist options
  • Save ulfryk/722390e1fa8ee5f328e3 to your computer and use it in GitHub Desktop.
Save ulfryk/722390e1fa8ee5f328e3 to your computer and use it in GitHub Desktop.
publish git flow feature and add PR
#! /bin/bash
format_green_bold="\x1b[32;01m"
format_reset="\x1b[00m"
branch_name=$(git symbolic-ref -q HEAD)
branch_name=${branch_name##refs/heads/}
branch_name=${branch_name:-HEAD}
feature_name=${branch_name##feature/}
echo -e "Publishing feature $format_green_bold$feature_name$format_reset to remote repository:\n"
git flow feature publish $feature_name
echo -e "\nCreating pull request from $format_green_bold$branch_name$format_reset to develop:\n"
hub pull-request -b develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment