Versions Compared

Key

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

...

  1. DeveloperCreate a branch -> Edit -> Add/Commit/Push to the branch

    In the following, let's assume the developer "seb56" is making a small change to  "git_sim_pkg" repository.

    Code Block
    seb56@hypocentre /home/seb56/gm_sim_pkg :git checkout -b fix_hardcoded_python
    Switched to a new branch 'fix_hardcoded_python'

    https://www.atlassian.com/git/tutorials/using-branches


    Suppose the developer edited the file "setup_remote.sh.  The developer does "git add"  followed by "git commit".

    Code Block
    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git add setup_remote.sh
    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git commit -m "Replaced the hard-coded python path with a variable"
    [fix_hardcoded_python c2a7911] Replaced the hard-coded python path with a variable
     1 file changed, 2 insertions(+), 1 deletion(-)

    When the developer feels the code is ready, he/she does "git push" to the new branch.

    Code Block
    seb56@hypocentre /home/seb56/gm_sim_pkg/wrapper :git push origin fix_hardcoded_python
    Counting objects: 4, done.
    Delta compression using up to 32 threads.
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (4/4), 410 bytes | 0 bytes/s, done.
    Total 4 (delta 3), reused 0 (delta 0)
    remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
    To github.com:ucgmsim/gm_sim_pkg.git
     * [new branch]      fix_hardcoded_python -> fix_hardcoded_python
    
    
  2. Developer : Go to github repository and make a pull request. Specify a reviewer. The reviewer can be an expert or a team member who wishes to learn more about the code base.

    Go to Github, and notice the new branch that you created. Click Compare & pull request.

    Image Modified

    Enter the description of the code change and specify the reviewer. In this example, "dlagrava" is selected.



    Before clicking Create pull request, scroll down and have a good look at your code change. If you're happy, make a pull request.
    Image Modified

    Image Modified


    The developer will be presented a new page from Pull requests tab.
    Image Modified




    Reviewer : The reviewer receives an email requesting the review. He/she can view the code changes, and make an comment line by line. If the reviewer is happy with all the changes, he can "approve" the code.

    "dlagrava" visits the pull request page. The reviewer clicks the link to start the review.

    Image Modified
    Click Add your review

    Image Modified

    The reviewer can click Review changes to comment/approve or request changes.

    Image Added
    If the reviewer wishes to make a specific comment for a certain line of code, click +   in the begging of the line and leave a comment and click Add single comment, this will immediately send an email to the developer.
    Image Added


    Info

    Alternatively, if the reviewer wishes to make multiple comments, he/she may click Start a review, which will place the comment in "Pending" state, and after all comments have been made, the reviewer can click Finish your review to send the whole collection of comments in a single email.
    Image Added

     

    The reviewer can finalize the review by clicking Submit review with 3 options - Comment, Approve and Request changes.

    Image Added


  3. Admin (Reviewer) : The repository admin (most of the time, the reviewer will function as the admin) will "Merge the pull request".
  4. Developer : Remove the branch unless the branch needs to be kept.

 

...

Content by Label
showLabelsfalse
max5
spacesQuakeCore
sortmodified
showSpacefalse
reversetrue
typepage
labelscodereview

...