What is the appropriate way to reflect the commit after receiving a review from GitHub's pull request?

Asked 2 years ago, Updated 2 years ago, 66 views

As a result of a pull request to an OSS on GitHub, I would like to know the appropriate method of reflecting the indication when the review is pointed out.However, let's say that the pull request eventually has to be put together into one commit (probably for any OSS).

My method reflects the indication in the local source code and implements the following:

$git commit-am "Reflects review points"
$ git rebase-i HEAD-2
... Summarize the two commits in squash (remove the above commit message) ...
$ git push-origin [Branch made for Pullik]

In this case, the pull request can be summarized into one commit, but the source code before the review was pointed out will be completely gone, so it will be difficult for the reviewer to determine if the review was properly reflected.

Is it possible to confirm the changes before and after the review, and summarize the final pull request into one commit?

git github

2022-09-30 21:43

2 Answers

I think it's probably the same for any OSS, but

Is that true, I've heard of projects that have been forced to rebase when they are divided into multiple commits, but I don't think it's appropriate to summarize the commitments at this point as concerns arise.

In addition to simple tree merging, GitHub's pull request merging options include Rebase and Squash.Squash is merged as a single commit, so if the maintenance is using it, the contributor does not need to be aware of it.(Other than that, it is rare for me to squash at the pullik stage.)

Naturally, this area depends on the project's policy...


2022-09-30 21:43

If the changes are minor, such as simple typographical errors, you may want to summarize them in rebase, but otherwise "make sure to commit pull requests" is not always correct.

Ultimately, it's up to the owner to decide how to incorporate it in the merge, but commitments should be divided into "meaningful" units.(For this example, review "before" and "after")

In addition, GitHub's help page had the following instructions:

https://help.github.com/ja/articles/about-pull-requests

Do not force push a commit to a pull request. Force push may break pull requests.

rebase generates a new commit hash.


2022-09-30 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.