Guide to making dygraphs changes

So you've made a change to dygraphs and would like to contribute it back to the open source project. Wonderful! This is a step-by-step guide explaining how to do it.

The list of steps may look a bit daunting, but it's not too bad, especially if you have any familiarity with git or github. If you run into any problems while following the instructions, feel free to contact dygraphs-users.

Why not just take patches? This process means less work for me (the maintainer) and it also results in your name appearing in the list of dygraphs commits. This lets you take credit for your work.

  1. Create an account on github. This is free, painless and will let you claim credit for your changes.
  2. Install git. github has a good writeup here.
  3. Create a fork of the dygraphs repository on github by clicking this link and then the "Fork" button.
  4. You should see a URL along the lines of git@github.com:yourname/dygraphs.git
    Copy this, open up a terminal and run
    git clone git@github.com:yourname/dygraphs.git
    This pulls the dygraphs code down onto your local disk.
  5. cd into the dygraphs directory and make your changes.
    If you've already got them somewhere else, just copy them over.
    I try to adhere to Google's JS style guide and would appreciate it if you try to as well.
  6. Be a good citizen! You'll have to do this before I accept your changes, so you may as well do it now
  7. Commit your changes locally: run
    git add .
    git commit
    Type in a description of your change. This will eventually appear in the dygraphs commit list.
  8. Push your changes to github by running
    git push
    This will send your changes to your forked repository on github.
  9. Go to your fork of dygraphs on github (i.e. github.com/yourname/dygraphs).
    Click the "Pull Request" button.
    This will send me an email with a pointer to your changes.
  10. I'll review your changes and (unless your code is perfect!) give you some feedback. Make these suggested changes in your local git client and re-run "git commit" and "git push" so that I can see them.
  11. Once your change is ready, I'll pull it into the main dygraphs repository and publish it to the web.