Some advice with Github

Permalink
Howdy people,

I found a small bug in the master branch of Concrete5 on github and since I've been thinking about contributing some code, I set up the Mac version of GitHub, grabbing the master branch.

I think I might be missing something really obvious here, but I'm confused about how to actually get my change listed as a pull request. What I did was:

- I hit a button on the github site, 'Clone in Mac', this set up a local copy of Concrete5
- I made by change to one of the files
- In the GitHub app, I committed my change
- I've then tried both Synchronize on the repository as well as selecting Push. Push is rejected with 403 error, I'm guessing because the master branch is set as read only.

So what I'm thinking I need to do here is create my own branch/patch, and then submit the pull request to the master branch, from my branch (sorry if the terminology is wrong). But what I'm not sure about is when I should create this branch (before or after my change), what I should call it, etc.

Could someone clear this process up for me? :-)

-Ryan

mesuva
 
12345j replied on at Permalink Best Answer Reply
12345j
github is generally a pain. What you want to do is to keep your master branch up to date, and branch off from that- so create a branch bug-1 and push your changes to that. Then go to the github site, go to your fork, and select your branch. Then hit pull request and it should work (but you can view a preivew or close if anything goes wrong.) good luck!
mesuva replied on at Permalink Reply
mesuva
Thanks 12345j, that helps with what I was thinking I needed to do.

My missing step was that I need to fork Concrete5 first, so I have my own copy as such on github, THEN I could branch off of it, and THEN submit pull requests.

Before I was just taking a clone of the master branch, creating a direct fork and trying to push back to that.

So now my single character change has been submitted as a push request! Hooray!

Cheers!
exchangecore replied on at Permalink Reply
exchangecore
In case you're looking for a more detailed guide or others are who stumble across this in the future you should check out my blog post on how to get started contributing to Concrete5.7 on github:

https://www.exchangecore.com/blog/contributing-concrete5-github/...