Skip to content

Instantly share code, notes, and snippets.

@calebccff
Created February 22, 2024 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calebccff/fdc0e163183aabeb563ae070083096d6 to your computer and use it in GitHub Desktop.
Save calebccff/fdc0e163183aabeb563ae070083096d6 to your computer and use it in GitHub Desktop.
Send a git pull request with one command
#!/bin/bash
start="$1"
url="$2"
end="$3"
shift 3
pull=$(mktemp /tmp/git-pull-XXXXXXX.pull)
echo "From: $(git config user.name) <$(git config user.email)>" >> $pull
echo "Date: $(date -R)" >> $pull
echo "Subject: [PULL] Please pull $(git rev-parse --abbrev-ref --symbolic-full-name @{push})" >> $pull
echo >> $pull
git request-pull "$start" "$url" "$end" >> $pull
git send-email --annotate "$@" $pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment