githubpull-requestgithub-codereviews

What is Crucible's "Add Latest" equivalent in GitHub?


I'm use to using Crucible on code reviews, but we started using Github pull-request. I've created a pull-request and now completed the changes suggested by one of the code reviewers. What I did was I committed the changes on the same branch but when I went to github, the commits were separated. In Crucible you can view all the commits in one view. There is an option to merge commits but I'm not sure which one is the correct option. Basically, I just want to update the pull request with the latest change and reviewers will be able to see what was change from previous commits. Not sure if I merge/rebase it and changes will not be viewable anymore

enter image description here


Solution

  • What I did was I committed the changes on the same branch but when I went to github, the commits were separated.

    This is expected, since you have made a first commit (before you received comments from your teammates), and a subsequent commit, meaning that you have two snapshots of your repository on that branch.

    GitHub Pull Request is comparable to Crucible's Post-commit reviews.

    There is an option to merge commits but I'm not sure which one is the correct option.

    The Merge pull request button shown in your screenshot should only be used once your reviewers and you have agreed that your changes are in good standing and that you want to merge your change into the target branch. It has nothing to do with "merging" your two commits together, which in Git terms is called squashing.

    Basically, I just want to update the pull request with the latest change and reviewers will be able to see what was change from previous commits.

    If you or your reviewers go to the Files changed tab, and select Changes from, you can see either

    Take a look at the documentation About pull request reviews if you want to know more about it.