-
-
Save abhinavm24/63b175fceb3bbab512060f2f36ddb760 to your computer and use it in GitHub Desktop.
Make a new pr from an existing cloned repository by simply doing `make_pr`
This file contains 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 | |
echo "Setting up a new PR" | |
# Ask for username | |
echo "Please enter the original GitHub organization or username of the repository (the part of the URL after github.com/): " | |
read org | |
# Ask for repo | |
echo "Please enter the repository name: " | |
read name | |
#Ask for branch | |
read -e -p "Please enter the branch of the repository you wish to use: " -i "main" branch | |
git remote add upstream https://github.com/$org/$name | |
git remote update | |
git checkout upstream/$branch | |
#Ask for new branch name | |
echo "Please enter a new branch name to use: " | |
read new_branch | |
git checkout -b $new_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment