Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The Catmandu development team uses GitHub to collaborate. We greatly appreciate contributions submitted via GitHub, as it makes tracking these contributions and applying them much, much easier. This gives your contribution a much better chance of being integrated into Catmandu quickly!
To help us achieve high-quality, stable releases, git-flow workflow is used to
handle pull-requests, that means contributors must work on their
rather than on their
master. (Master should be touched only by the core dev
team when preparing a release to CPAN; all ongoing development happens in
branches which are merged to the
Here is the workflow for submitting a patch:
Fork the repository http://github.com/LibreCat/Catmandu (click "Fork")
Clone your fork to have a local copy using the following command:
$ git clone git://github.com/$myname/Catmandu.git
As a contributor, you should always work on the
devbranch of your clone (
masteris used only for building releases).
$ git remote add upstream https://github.com/LibreCat/Catmandu.git $ git fetch upstream $ git checkout -b dev upstream/dev
This will create a local branch in your clone named
devand that will track the official
devbranch. That way, if you have more or less commits than the upstream repo, you'll be immediately notified by git.
You want to isolate all your commits in a
topicbranch, this will make the reviewing much easier for the core team and will allow you to continue working on your clone without worrying about different commits mixing together.
To do that, first create a local branch to build your pull request:
# you should be in dev branch here git checkout -b pr/$name
Now you have created a local branch named
pr/$namewhere I<$name> is the name you want (it should describe the purpose of the pull request you're preparing).
In that branch, do all the commits you need (the more the better) and when done, push the branch to your fork:
# ... commits ... git push origin pr/$name
You are now ready to send a pull request.
pull requestvia the GitHub interface. Make sure your pull request is based on the
pr/$namebranch you've just pushed, so that it incorporates the appropriate commits only.
It's also a good idea to summarize your work in a report sent to the users mailing list (see below), in order to make sure the team is aware of it.
When the core team reviews your pull request, it will either accept (and then merge into
dev) or refuse your request.
If it's refused, try to understand the reasons explained by the team for the denial. Most of the time, communicating with the core team is enough to understand what the mistake was. Above all, please don't be offended.
If your pull-request is merged into
dev, then all you have to do is to remove your local and remote
git checkout dev git branch -D pr/$name git push origin :pr/$name
And then, of course, you need to sync your local dev branch with the upstream:
git pull upstream dev git push origin dev
You're now ready to start working on a new pull request!