Skip to content

Instantly share code, notes, and snippets.

@zph
Last active April 11, 2023 05:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zph/9fc03790c0146f4d181bdfc28db8b799 to your computer and use it in GitHub Desktop.
Save zph/9fc03790c0146f4d181bdfc28db8b799 to your computer and use it in GitHub Desktop.
Pull request helper script
#!/usr/bin/env bash
set -eou pipefail
main() {
local branch_name
branch_name="$(git rev-parse --abbrev-ref HEAD)"
local base_branch="${1:-master}"
\git push origin "$branch_name"
hub pull-request -b "$base_branch"
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment