The MacPorts project uses the Git distributed version control system to manage the code for the entire project. Our master repositories are hosted on GitHub.
We maintain public repositories for almost all our project code and documentation, including a GitHub repository for the MacPorts system itself, for the MacPorts ports, and even for the guide you are reading right now.
If you’re not familiar with Git and need an introduction, we recommend the book Pro Git, by Scott Chacon and Ben Straub. The book is available for free online, and is published under a Creative Commons license.
You should feel free to fork any of our code repositories, make improvements to the code, and contribute them back to us via a GitHub pull request. We are grateful for improvements to absolutely everything, including new ports, fixes to ports, improvements to our base software, improvements to our documentation and our web site, or anything else you see.
The main steps for submitting a pull request are:
Make your changes in your own Git repository:
Make your changes.
For changes to ports and code, please follow the information elsewhere in this guide, and test your changes carefully.
Changes to Portfiles should also pass +port lint+
.
Be sure to rebase your changes so as to minimize the number of commits. Ideally, you should have just one.
(There are exceptions. If you have several unrelated fixes, or you’re changing multiple packages, etc., you might need more than one commit. The point is to minimize them, ideally with one commit per logical change.)
Make a pull request from your branch in your own git repository to the appropriate MacPorts repository.
You can do this on the appropriate GitHub page. For example, you can request a pull of a Portfile on the macports-ports repository pull request page.
We try to process pull requests very quickly. If you do not see activity on your request within a few days, please feel free to get in touch with us on the macports-dev@lists.macports.org mailing list to request a review and/or commit. Please include a link to the pull request in your email.