Contributing to a project on Github
After getting my head into Devel::Declare::Context::Simple to create the bare URL for my last blog post
I realised that I’ve percolated enough knowledge about the module that it would be a good idea to redirect it back to the project by at least doing the POD.
This will be the first time I’ve “properly” contributed in some form to an opensource project (“properly” being via source control management & a patch).
I only use Git for my Github projects, so forking etc is all new to me. To break it down into a few simple steps the process to contribute would be:
- Fork project
- Clone your fork
- Make your changes
- Push changes back to you fork
- Send pull request back to original project
Here are the minutiae steps I went through for Devel::Declare:
- Went to Devel::Declare project on Github and forked it.
- Forked project now appears in my project list.
- Cloned my forked Devel::Declare (use “Your Clone URL” copy/paste)
git clone firstname.lastname@example.org:draegtun/devel-declare.git
- Linked my forked project to original
git remote add upstream git://github.com/rafl/devel-declare.git
git fetch upstream
- Make my changes to project
- Run tests (in case I did something stupid!)
- Clear down build once happy
- Push my changes back to my fork
git commit -a -m "Documentation added to D::D::Context::Simple + examples directory"
git push origin master
Now on Github the changes can be seen in my fork
All I do now is click the “pull request” button and off went a request of my changes to rafl. Fingers cross my documentation changes were good enough to be accepted.
So I’m no longer a virgin to contributing to this opensource malarky 🙂