nishakm / puns

Practice Submitting and Updating PRs
Creative Commons Attribution Share Alike 4.0 International
15 stars 19 forks source link

Github won't let me create a new branch #6

Closed AnaHowellsFerreira closed 6 years ago

AnaHowellsFerreira commented 6 years ago

Hi Nisha! I am practicing using github and wanted to create a branch from the master branch called update-ducks. I am following along this tutorial and using github (instead of git) to add some emojis to my ducks file, since it is so lonely. When I click on the drop down menu and start typing the name of the new branch I want to create (update-ducks), it won't give me the option to create a new branch. I am wondering if that is a set up that you have on your account that won't allow others to create branches or if i am missing something. Here's is the tutorial I am following... https://services.github.com/on-demand/ @ 10:40 Thank you! 🦆 😊

einzruff commented 6 years ago

Hi Ana, if it's ok if I ask, which video in the On Demand Training section are you referring to?

einzruff commented 6 years ago

Ok, I think I understand. I see this: https://services.github.com/on-demand/intro-to-github/create-a-branch. From what I understand, let's say you're on Nisha's page (github.com/nishakm/puns) and you go to click on the master branch, then in the box type your 'username-newbranch' where username is your username; according to the tutorial there should be blue text option that says "Create branch..." but I don't think it will because you are not what's called a collaborator on her own repository, like you were saying. But, if you go to your page (github.com/yourusername/puns/ and try the same thing, it will work, and create the new branch, because you have user rights to your own repo/fork of the code.

AnaHowellsFerreira commented 6 years ago

that's exactly what happened! 😃 probably i would have to ask permission to become a contributor first. and yes, i was able to do that on my own test repo. yay! thank you Daphne

nishakm commented 6 years ago

Hey @AnaHowellsFerreira! @einzruff is correct - you cannot create a branch in someone else's project unless you are a contributor. Typically that happens when two or more people are working closely or are in the same team. You can, however, create a branch in your fork of another project, push the changes to that branch and then submit a pull request from that branch to the original project's master branch.