Skip to content

Latest commit

 

History

History
38 lines (36 loc) · 2.18 KB

CONTRIBUTING.md

File metadata and controls

38 lines (36 loc) · 2.18 KB

Contributing to flystim

The following pull request flow description is slightly modified from a similar document in the DragonPHY project. More details on using pull requests can be found in this tutorial.

We use pull requests (PRs) to manage updates to the code base, and block merging of PRs unless automated tests pass (they're stored in the flystim/tests subdirectory). Here are the steps to go through to use this system.

  1. Make sure that you're up-to-date with the latest changes from the master branch:
> git pull origin master
  1. Create a new branch to store your work, and change to that branch. The name of the branch should give some brief indictation of the feature that you're working on. For example, you might call the branch new_vert_bars if it represents a new kind of vertical bar stimulus.
> git checkout -b NAME_OF_YOUR_BRANCH
  1. Make changes to the code and commit them.
<make changes to code>
> git commit -am "description of changes"
  1. Push code back to GitHub:
> git push origin NAME_OF_YOUR_BRANCH
  1. Go to the flystim GitHub page.
  2. Click Pull Requests -> New Pull Request.
  3. Make sure "base" is at master and set compare to the name of your branch.
  4. Add a title and description of your pull request and click "Create Pull Request".
  • If the tests pass, then you should be able to click a button at the bottom of the page to merge the pull request. At that point it is safe to click the button that deletes the branch you created, since the changes have been merged into the master branch.
  • If the tests don't pass, then modify the code and push it to your branch. The checks will automatically be re-run and the pull request will be updated with the build status. In other words,
<make changes to code>
> git commit -am "description of changes"
> git push origin NAME_OF_YOUR_BRANCH
  1. Now that the changes are merged, switch back to the master branch and pull the changes on you machine.
> git checkout master
> git pull origin master