Created
February 22, 2024 16:10
-
-
Save kcxt/fdc0e163183aabeb563ae070083096d6 to your computer and use it in GitHub Desktop.
Send a git pull request with one command
This file contains hidden or 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 | |
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