I am aware that the code is managed at https://github.com/joomla/joomla-cms (for the CMS at least) and that I should submit pull requests to suggest that code be added.

I'm especially interested in any good tips on managing my contributions and making sure that the code gets into the right place.

Should I use different branches in my forked repo to manage different contributions? If so, what is the best way to link that branch back to the main branches in the Joomla repo?

Is there a good method to keep my forked copy up to date?

Any suggestions on a good flow for managing this process would be really helpful!

2 Answers 2


It's always good to have a dedicated branch for each Pull Request you are going to make.

One of the simplest ways to create a up-to-date new branch is to just use the GitHub web gui to edit the file in the original repository. When saving, GitHub will automatically create a new branch in your fork based on the branch you currently edit. If you want to edit more files, you can edit them in your newly created and up-to-date branch.

If you are a bit familiar with Git, then you rebase your forked staging branch with the upstream original branch so it is in sync before you create new branches. Also if you have to update a PR, it's recommended to rebase it instead of merging master. While both ways work, merge-commits are just creating bad history and are harder to squash.

Generally speaking, PRs should be "atomic". This means if you try to fix something, only fix that particular bug. Don't fix two different bugs in the same PR and also don't do codestyle fixes. It's easier to test and also less likely to create conflicts if the PR lives a bit longer than expected.

And of course add a good description of what you want to do and testing instructions to reproduce the issue and test your fix :-)


One big thing that helps with grouping your contributions is to move each contribution into a separate, appropriately named, branch. If you're adding a feature, use a prefix like feature- and the add a one or two word feature description for the branch name. If it's a bug fix in the JForm class, use bugfix-jform. This makes it really easy to identify what you're working on by checking your git branches via git branch -a.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.