The following commands are used by Tigerbrew's contributors to setup a fork of Tigerbrew's Git repository on GitHub, create a new branch and create a GitHub pull request of the changes in that branch.
To set up your own fork of the Homebrew repository:
- Change to the directory containing your Tigerbrew installation with
cd $(brew --repository)
- Fork the Tigerbrew repository. This creates a pushable, personal remote repository. This is needed as only Tigerbrew maintainers have push access to the main repository.
- Add the pushable forked repository with
git remote add YOUR_USERNAME https://github.com/YOUR_USERNAME/homebrew.git
To make a new branch and submit it for review:
- Checkout the
master
branch withgit checkout master
- Retrieve new changes to the
master
branch withbrew update
(which callsgit pull
) - Create a new branch from the latest
master
branch withgit checkout -b YOUR_BRANCH_NAME origin/master
- Make your changes to any Homebrew formula with
brew edit
(following all the requirements in the Formula Cookbook). Runbrew audit ANY_CHANGED_FORMULA
,brew tests
andbrew install ANY_CHANGED_FORMULA && brew test ANY_CHANGED_FORMULA
and ensure all of these pass without issue. If there's abottle do
block in the formula: don't remove it; we'll update it when we pull it. - Make a separate commit for each changed formula with
git add
andgit commit
. - Upload your new commits to the branch to your fork with
git push --set-upstream YOUR_USERNAME YOUR_BRANCH_NAME
- Go to https://github.com/mistydemeo/tigerbrew and create a pull request to request review and merge of commits in your pushed branch. Make sure you explain why the change is needed and, if fixing a bug, how to reproduce the bug. Please note that the preferred commit message format for simple version updates is "FORMULA_NAME NEW_VERSION", e.g. "
source-highlight 3.1.8
".devel
version bumps should have the commit message marked with addtional(devel)
suffix like "nginx 1.9.1 (devel)
". Await feedback or a merge from Homebrew's maintainers.
To respond well to feedback:
- Ask for clarification of anything you don't understand and help with anything you don't know how to do.
- Post a comment on your pull request if you've provided all the requested changes/information and it hasn't been merged after a week. Post a comment on your pull request if you're stuck and need help.
- Keep discussion in the pull request unless requested otherwise (i.e. do not email maintainers privately).
- Do not continue discussion in closed pull requests.
- Do not argue with Tigerbrew maintainers. You may disagree but unless they change their mind please implement what they request. Ultimately they control what is included in Tigerbrew as they have to support any changes that are made.
To make changes based on feedback:
- Checkout your branch again with
git checkout YOUR_BRANCH_NAME
- Make any requested changes and commit them with
git add
andgit commit
- Squash new commits into one commit per formula with
git rebase --interactive origin/master
- Push to the fork's remote branch and the pull request with
git push --force
Once all feedback has been addressed and if it's a change we want to include (we include most changes) then we'll add your commit to Tigerbrew. Note it will not show up as "Merged" because of the way we include contributions.
Well done, you are now a Tigerbrew contributor!