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.
Always Pull Before a Push This is a bedrock rule. Before you try to push code out to the repository, you should always pull all the current changes from the remote repository to your local machine. Doing so will ensure that your local copy is in sync with the remote repository.
Push sends commits and asks them to update their branch. This requires that things be right on their end. This cannot combine parallel development. Pull gets commits and has your Git update your remote-tracking name, then runs a second Git command to update your branch.
Creating the pull request. On GitHub.com, navigate to the main page of the repository. In the "Branch" menu, choose the branch that contains your commits. Above the list of files, click Pull request.
It is actually (from GitHub Remotes help page)
git push REMOTENAME LOCALBRANCHNAME:REMOTEBRANCHNAME
You did not:
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.
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