Last active
December 22, 2021 12:20
-
-
Save davidfurlong/fec51dd1d851d117f81eca655fa6e51c to your computer and use it in GitHub Desktop.
[See newer patch.sh] Create a PR for a small uncommitted change with one command. Assumes dev is your main branch and that you have hub installed / use github for PRs
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 | |
timestamp=$(date +%Y-%m-%d-%H-%M-%S) | |
read -p "When merged, this commit will: " msg | |
git checkout -b patch-$timestamp && | |
git add ../ && | |
git commit -m "$msg" && | |
hub pull-request -p -m "$msg" && | |
git checkout dev && | |
echo "Successfully commited, opened PR for branch $msg and switched back to dev" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment