5

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?

4

2 回答 2

5

尝试这个:

git pull-request -b org:master -h org:feature

包装的礼物.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}
}
于 2013-11-18T13:10:45.230 回答
0

你试过git request-pull origin/master develop吗?

于 2013-10-31T14:04:49.983 回答