OpenEVSE / openevse_esp32_firmware

OpenEVSE V4 WiFi gateway using ESP32
155 stars 107 forks source link

RFC: do rebases instead of merges while working on PRs #803

Open kolyshkin opened 4 months ago

kolyshkin commented 4 months ago

@jeremypoulter I'm really sorry for the offtopic, but I see you are adding merge commits when working on PRs from time to time. I clearly understand the reason why -- it allows to test the PR with a newer code from master branch.

Yet, let me suggest a better way of doing it -- doing a rebase instead of merge.

The reason is, merge commits create "noise" and make the PR seemingly more complicated than it is. Consequently, it makes the git history more complicated than it should be, with all the unnecessary intermediate merge commits.

If you're doing the update from the github GUI (by using the "Update branch" button), you can click on an arrow down link next to it and choose "update with rebase", like this:

image

If you're doing this from the git cli, it's just git pull --rebase origin master followed by git push -f to the branch.

(again, I am sorry I'm bringing this here, I merely hope this will be useful to you)

Or, perhaps, you prefer merges to rebases for some other reason that I don't know. If you can share it that'd be awesome.