11

I'm about to pull my hair out.

I've submitted a pull request from my fork of a project, back to the owner/maintainer's repo. In this pull request, some things came up that I had to add/change based on new information. I've made said changes, and now I'm trying to PUSH to that pull request.

According to Github's "issue" page, at the bottom, it says I can push commits directly to the issue (pull request) by pushing to branch abc123 on my fork of the repository.

The problem is, when i do git push origin abc123 I get the error:

fatal: 5fa087b35cb8379f282174df2f4197ba258ffd05 cannot be resolved to branch.

I'm not sure how to fix this. Should I just close the pull request and re-submit? Or is there something I'm doing wrong, or more than I need to do?

Thanks.

Jim Rubenstein
  • 6,836
  • 4
  • 36
  • 54

1 Answers1

20

It is actually (from GitHub Remotes help page)

git push REMOTENAME LOCALBRANCHNAME:REMOTEBRANCHNAME

You did not:

  • create a local branch 'abc123'
  • specify a local branch name

So, what should work is (if you are on master branch for instance):

git push origin master:abc123

Generally, the default push policy is "matching": git push origin abc123 would try to push a local branch named abc123 to a remote branch with the same name.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • That worked, and clears things up. I guess I'm just a gitnoob. Mercurial doesn't have these crazy features (or...I never use them) haha. – Jim Rubenstein Dec 12 '11 at 20:08