This document describes how to “fork” the BAli-Phy repository and submit a “pull request” in order to contribute changes.
If instead you just want to get the source code, then you should ignore this tutorial and just “clone” the repository.
Click the “Fork” button on https://github.com/bredelings/BAli-Phy/ to create a version of the code under your own account. (You will need a github account for this.)
Download your version of the code:
git clone git@github.com:your-username/BAli-Phy.git
The name origin
in your local repo will then refer to
your modified version of BAli-Phy.
Create a new remote called upstream
to refer to the
upstream version:
cd BAli-Phy/
git remote add upstream https://github.com/bredelings/BAli-Phy.git
git remote -v
git fetch upstream
Make the master
branch track upstream changes.
git checkout master
git branch --set-upstream-to upstream/master
This is optional, but recommended. The plan is that you will use the
master
branch to track the upstream source, and the make
other branches to hold your changes.
Create a new branch to contain your changes. In this example the
branch is called my-new-feature-branch
, but you should pick
a name that describes the changes you are making.
git fetch upstream
git branch my-new-feature-branch upstream/master
git checkout my-new-feature-branch
Edit files and commit changes.
Publish your changes to to github.
git checkout my-new-feature-branch
git push origin my-new-feature-branch
New pull request
compare across forks
.your-username/BAli-Phy
for the head
repository.compare:my-new-feature-branch
Create pull request
.Tests will run automatically on the proposed changes, and we will review the changes. When everything is ready, changes will be merged to the master branch.