1*ae49d4a4SchristosSee README.hackers for notes on coding styles. 2*ae49d4a4Schristos 3*ae49d4a4SchristosThe NTP project's github repository is at https://github.com/ntp-project/ntp. 4*ae49d4a4Schristos 5*ae49d4a4SchristosThere are two branches, master and stable. 6*ae49d4a4Schristos 7*ae49d4a4SchristosThe stable branch is the current supported production code branch, the 8*ae49d4a4Schristosntp-stable code (even 2nd number). 9*ae49d4a4Schristos 10*ae49d4a4SchristosThe master branch is for new development, also known as ntp-dev (which 11*ae49d4a4Schristoshas an odd 2nd number). 12*ae49d4a4Schristos 13*ae49d4a4SchristosIf you have some work you'd like to add, then if there is any interest 14*ae49d4a4Schristosin seeing that work in the current production release then base your work 15*ae49d4a4Schristoson the stable branch, and pull your work into a master copy to allow for 16*ae49d4a4Schristospublishing your changes in the ntp-dev or master branch. 17*ae49d4a4Schristos 18*ae49d4a4SchristosIf there is no expectation that your work will be included in the 19*ae49d4a4Schristoscurrent stable release (the ntp-stable code) then it's better to do your 20*ae49d4a4Schristoswork on a copy of the master branch. 21*ae49d4a4Schristos 22*ae49d4a4SchristosMake sure that any changes you make to stable pull cleanly into master. 23*ae49d4a4Schristos 24*ae49d4a4SchristosIt's possible that after pulling your changes from stable to master that 25*ae49d4a4Schristossome additional cleanup will be required in master. Please do this. 26*ae49d4a4Schristos 27*ae49d4a4SchristosIf you follow this method, then if you submit a pull request for either 28*ae49d4a4Schristosmaster or for master+stable, it will be easy for us to evaluate and 29*ae49d4a4Schristosincorporate your work. 30*ae49d4a4Schristos 31*ae49d4a4SchristosPlease also note that your submissions will be able to be evaluated and 32*ae49d4a4Schristoshandled sooner if the repo that contains your pull requests also includes 33*ae49d4a4Schristostest cases. 34*ae49d4a4Schristos 35*ae49d4a4SchristosThe general workflow is as follows: 36*ae49d4a4Schristos 37*ae49d4a4Schristos1) If you haven't, create a fork of ntp-project/ntp with your github account. 38*ae49d4a4Schristos i) Log on to github.com with your github account. 39*ae49d4a4Schristos - If you don't have one, create one first. (read: https://help.github.com/articles/signing-up-for-a-new-github-account) 40*ae49d4a4Schristos - Make sure you also have a SSH key associated with your github account. 41*ae49d4a4Schristos (read: https://help.github.com/articles/generating-ssh-keys/) 42*ae49d4a4Schristos ii) Go to https://github.com/ntp-project/ntp 43*ae49d4a4Schristos iii) On the top right corner, right below the header bar, there is 44*ae49d4a4Schristos a button labeled "Fork". Click on it. This will fork the current 45*ae49d4a4Schristos ntp master to your own account. Once done, it will go to your account's 46*ae49d4a4Schristos version of the ntp repository. (Your fork of ntp source) 47*ae49d4a4Schristos iv) Clone a local version of your fork. 48*ae49d4a4Schristos - git clone git@github.com:<your_username>/ntp 49*ae49d4a4Schristos 50*ae49d4a4Schristos2) Look through the bugs listed in the bug tracker: http://bugs.ntp.org/ 51*ae49d4a4Schristos 52*ae49d4a4Schristos3) Once you've found a bug to work on: 53*ae49d4a4Schristos 54*ae49d4a4Schristos i) Create a branch off your own master branch of your local fork. 55*ae49d4a4Schristos (the <branchname> can be any valid short string that will tell you 56*ae49d4a4Schristos what you're working on) 57*ae49d4a4Schristos - git checkout -b <branchname> 58*ae49d4a4Schristos 59*ae49d4a4Schristos ii) Start working on the bug. 60*ae49d4a4Schristos iii) When you create changes in the source, it would help you to 61*ae49d4a4Schristos keep track of your changes by committing to your local repo. 62*ae49d4a4Schristos (This way, every small change is tracked and when you've 63*ae49d4a4Schristos made a mistake, you can always go back.) 64*ae49d4a4Schristos - git commit -a -m "description of change" 65*ae49d4a4Schristos iv) Once you are satisfied, you can push to your github account's 66*ae49d4a4Schristos repository. 67*ae49d4a4Schristos - git push origin <branchname> 68*ae49d4a4Schristos v) (go to step iii). 69*ae49d4a4Schristos 70*ae49d4a4Schristos4) Once you feel you've fixed the bug (and tested it), you need to 71*ae49d4a4Schristos create a pull request on your branch on github. (Read up on 72*ae49d4a4Schristos pull requests @ https://help.github.com/articles/using-pull-requests) 73*ae49d4a4Schristos 74*ae49d4a4Schristos i) Create your pullrequest by following the instructions @ 75*ae49d4a4Schristos https://help.github.com/articles/creating-a-pull-request/ 76*ae49d4a4Schristos 77*ae49d4a4Schristos5) Your pull request will be reviewed by committers and when it 78*ae49d4a4Schristos passes review, it will be merged by the reviewer/allowed committer. 79*ae49d4a4Schristos 80*ae49d4a4Schristos6) You have fixed a bug. Goto step #2. 81*ae49d4a4Schristos 82*ae49d4a4SchristosIf these patches are for a bugzilla issue, mark the issue as Resolved/READY 83*ae49d4a4Schristoswith a comment of "Please pick up the patches from XXX" where XXX is 84*ae49d4a4Schristossomething like: 85*ae49d4a4Schristos 86*ae49d4a4Schristos hostname:~user/path if it's a machine the reviewers have access to, or 87*ae49d4a4Schristos github-pull-request-URI 88*ae49d4a4Schristos 89*ae49d4a4Schristos--- 90*ae49d4a4Schristos 91