Contributing to the Git


(Ultima2876) #1

Hello everyone :smile:

As the primary developer of Stage3DPunk, I have a load of patches for FlashPunk that I’d like to contribute. However, as a complete github n00b… I have no idea how to go about it. I don’t know what a pull request is… I confess, I’m an old beast from the dark ages of SVN and haven’t yet updated my mindset to this new way of thinking.

So if someone can explain like I’m 5… I should be able to contribute some nice stuff to FlashPunk!


(André Perdigão) #2

I’m also a github noob but I might know something. The primary FlashPunk source code is in a public repository in Draknek account (https://github.com/Draknek/FlashPunk).

Anyone can look it up and fork it. Forking a git means that you create an entire copy of the repository to a personal repository, under your account. You can then make changes to the files and publish them to your own repository. After the changes are published, you can then go over to the original repository in Draknek and create a pull request. A pull request is something like asking the main developer to evaluate your changes and deciding if they should be merged with the main repository. If they’re merged, your changes will end up in the main branch.

I think all this can be managed via command line but I think it can be done over the Github website.

Feel free to correct me, of course!


(Jonathan Stoler) #3

This sounds right to me (but I’m also pretty new to git)!

One thing not mentioned in @andrepcg’s post is commits, which are pretty straightforward so he may have just assumed you understood them (a valid assumption). I’ll explain them anyway, though, in case others want to know. As you make changes to code in your repository, you commit the changes to said repository. A commit is like a snapshot of your code at a given time, and you can easily see what your codebase looked like at that time or revert to it if you made undesirable changes and want your code to be the same as it was back then. Also, looking at the list of commits provides a sort-of history of changes for your project. Since commits generally address single features (“added movement code,” “changed how XXX function works,” etc.) you can easily see how your (or someone else’s) project was put together, which is pretty neat!

I don’t know what OS you use, but on Macs, the official Github GUI App is really solid. They also have a Github for Windows, though I can’t vouch for its quality. I’ve also heard good things about SourceTree. A lot of IDEs have git integration as well.

Obviously you can use the command line instead, but GUIs are way easier to learn and look a bit nicer. You’re probably less likely to make a fatal mistake with a GUI than a command line, too. But that’s just my opinion, and I’m sure a lot of people would disagree.


(Jacob Albano) #4

I don’t love Git myself (Mercurial is my preference) but I’ve used the Github app a few times and it’s really nice.


(Ultima2876) #5

Awesome, thanks guys!


(Zachary Lewis) #7

GitHub created a great set of guides. I’d definitely suggest the following for contributing to FlashPunk:


(Ultima2876) #8

Nice, will give those a read in the morning. There’s an issue with the Text class in the current git version - the text formatting (eg the size setter) is ignored unless it is specified in the constructor - which one of my developers had me fix for Stage3DPunk. Figured I might as well start with that.