Reputation: 29507
I am new to git
and GitHub (where my username is myuser
). I am trying to submit my first ever pull request and am running into some issues.
someuser/somerepo
. Hence, I now have a myuser/somerepo
repo.mybranch
).mybranch
.git commit -a -m "Closes someuser/somerepo/#10"
git push
, where I was asked to authenticate.After the successful git push
, I see:
mysuer/somerepo
on GitHub, I see all the changes that I made there.someuser/somerepo
on GitHub, I see a message under Issue #10 stating myuser referenced this issue from a commit in myuser/somerepo 2 hours ago
So, off the cuff, it seemms like I've actually managed to do everything correctly so far. So I Googled "GitHub how to pull request" and I found this GitHub wiki article.
According to that article I need to go into GitHub, and from "the repository from which I'd like to propose changes", I need to choose the mybranch
option from the Branches menu.
However, I do not see mybranch
, I only see the branches that existed in the repo that I forked. This tells me I missed something.
So I have to ask (because they are all similarly related):
somerepo
repo, I have never contacted any of its maintainers; I guess I'm wondering if I don't even have permission to do a pull request. In which case my question would be: how does the GitHub repo authorization model work? (what users can do what to a repo)?Ultimately: What's my next step here, and how do I fix this so I can continue putting in my pull request?
Upvotes: 0
Views: 1181
Reputation: 3858
Seems like you haven't pushed your branch up to your fork repository, try doing:
git push -u origin mybranch
Here I'm assuming your remote is origin
(as by default). If not, use your remote's name instead of origin
.
EDIT:
I think there are some conditions (non fast-forward changes) in which your changes in a local branch will be pushed to the "default" remote branch (usually master
) when you don't specify the destination branch (i.e. by doing git push
), but of course this may be not your case at all :)
If you want to make sure your changes are in mybranch
, try the url
https://github.com/[user-name]/[repo-name]/tree/mybranch
It should show you your uploaded branch.
Hope that it helps!
Upvotes: 1
Reputation: 17480
You are super close. You actually want to go to your fork, click pull requests on the right, and click new to start the process
Upvotes: 1