Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a github issue describing the changes you plan on making to the code.

    You can add a new issue from this link:

    https://github.com/JeffersonLab/hps-java/issues/new

    You should assign the issue to yourself and tag it as an Enhancement if you are adding new functionality or a Bug if you are fixing an error.

    By default, you can set the Milestone to the next release tag (e.g. v4.1).

  2. Create a local development branch in your local copy of HPS Java.

    Start by updating the master so that your branch will be up to date when it is created.

    Code Block
    git checkout master; git pull


    Now create your local development branch based on the number in the issue tracker from step #1.

    Code Block
    cd hps-java; git checkout master; git pull; git checkout -b iss1234

    The "1234" should be is replaced by the actual issue number assigned automatically by the issue tracker.  You can see this on the webpage for the issue you created.

  3. Add files to commit that you have changed or added on this branch.

    Code Block
    git add someNewFile aFileIChanged

    These file names are obviously bogus! (smile)

  4. Commit changes to added or modified files.

    Code Block
    git commit -m "I changed some stuff and this is my detailed commit message."

    These files are now "staged" which means that they will be sent to github next time you execute a push.

  5. Push your local branch to github.

    Code Block
    git push -u origin iss1234

    Unless you have your SSH keys setup properly, you will need to enter your github name and password.

    This command will create the remote branch "iss1234" branch which your local copy will now track, meaning that if someone else also pushes to this branch, like your PR reviewer or some other collaborator, then you may use a pull command to get these updates into your local copy.

  6. Now you should be ready to open a PR to get your changes merged into master.

    Start by going to this URL:

    https://github.com/JeffersonLab/hps-java/compare

    In the second dropdown box that says "compare: master", select your development branch (e.g. iss1234 in this example).

    Click the Create pull request button.

    Give the PR a valid description and provide some relevant information on what you changed.

    Select an appropriate reviewer by clicking on the gear icon next to Reviewers

    If you know the account name of the expert who should review your request, select them as the reviewer.  Otherwise assign to 'mholtrop' (software coordinator for HPS).

    Now click Create pull request again.

    The new PR should now be visible on github within the PR list.

    https://github.com/JeffersonLab/hps-java/pulls 


  7. You now need to wait for your code to be reviewed and possibly tested depending on what was changed.

    The reviewer should provide feedback on changes they want to see before the request is merged, if there are any.

  8. Make changes requested by the reviewer using the typical 'git add', 'git commit' and 'git push' commands that were described above in steps 3-5.

  9. Once changes have been made to their satisfaction, the reviewer will approve the PR and your branch will be merged into the master.

    Now the master will have your changes so you can pull them into your local copy.

    Code Block
    git checkout master; git pull
  10. If the reviewer didn't do it for you when merging, you may also delete the local and remote branches if you are done with them.

    Delete the local branch:

    Code Block
    git branch -d iss1234

    Delete the remote branch:

    Code Block
    git push origin --delete iss1234

...