-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating pull requests using command line from git bash #1219
Comments
Yes you can make a bash script like: pr() {
git push -u origin "$1"
hub pull-request -h "$1" -F -
}
pr "my-branch1" <<MSG
This is a pull request title for my-branch1
This is a description of my pull request. Markdown body goes here.
MSG
pr "my-branch2" <<MSG
This is a pull request title for another branch
This is another description for my second pull request.
MSG
# .... Repeat for however many branches you have. In short, hub definitely allows you to automate opening pull requests from the command-line, but it's up to you to make the implementation. |
Thanks for your reply. I have tried with the above code but I am getting the error as (hub: command not found) And also you have mentioned" it allows you to automate opening pull requests". Did you mean I can open an existing pull request for the same branch or I can create a pull request for the same. |
Oh, I'm sorry. I thought that you opened an issue on this repository because you were already a user of |
https://github.com/max-lobur/dotfiles/blob/master/sh/pull_req.sh :
|
I am having trouble while using the solution given by @mislav So I have added the function you mentioned and it seems to work because it asked for my github username, password and 2FA code. Now is there a way all these steps can be skipped? I mean is there a way to authorize the user using the ssh keys? |
|
@laksh95 There's no way to athenticate the user to the GitHub API using SSH keys. See #1644 (comment) |
@max-lobur what is the first step I should create for create full request by command with hub ? and what command after create that function ?? |
@harmnot To create a pull request using hub:
|
Normally we use GIT UI to create the pull request from master to any branch or vice versa.
if there are many branches it takes so-much time to create pull request for each and every branch.
Are there any script or commands to create the pull request from GIT bash for multiple branches.
The text was updated successfully, but these errors were encountered: