I want to create a pull request for git from the command line using hub
. I have a clone of a repository belonging to an organization. The repository is using git flow, so I want to create a pull request for the develop
branch. I have already pushed my feature branch to the organization's repository.
All of the following give me:
Error creating pull request: Unprocessable Entity (HTTP 422)
Missing field: "head_sha"
Missing field: "base_sha"
No commits between Organization:branch and user:feature-branch
git pull-request
git pull-request -b develop
git pull-request -b Organization/Repo/develop
git pull-request -b Repo/develop
git pull-request -b origin/develop
I also tried using -b Organization:Repo:develop
, but that returns a 500 error. -b Repo:develop
returns a 404.
How can I create a pull request via hub
?
Once you've committed changes to your local copy of the repository, click the Create Pull Request icon. Check that the local branch and repository you're merging from, and the remote branch and repository you're merging into, are correct. Then give the pull request a title and a description. Click Create.
Go to your version of the repository on github. Click the “Pull Request” button at the top. Note that your friend's repository will be on the left and your repository will be on the right. Click the green button “Create pull request”.
Try this:
git pull-request -b org:master -h org:feature
Gift wrapped for .bashrc
function pull_request() {
BASE="${1:-master}"
HEAD=`git rev-parse --abbrev-ref HEAD`
ORG=org
hub pull-request -b ${ORG}:${BASE} -h ${ORG}:${HEAD}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With