How many PR reviews should I be doing when running Gitflow? I have a feature branch with quite a few changes on it. I've PR'd it with reviews and merged into the develop branch. There may be like one or two small changes left before the release. When I go to merge the release code into the main branch, should I be doing another full PR review. Especially since most of the changes are going to be the same as the stuff I reviewed in the PR from feature to develop, it seems like a waste of time, but also with my current understanding, if I don't do reviews on the second PR from release to main, some things could slip through the cracks. How do you handle this redundancy or is there some sort of industry standard method for this? Thanks!
One thought is maybe PRs and their reviews are just required going from feature to develop?
No. In fact, if you can, consider automating those "Git Flow merges"1. If you manage to automate them, then you will only need to have manual intervention if there are conflicts. In properly structured Git Flow, it's not possible to have conflicts when merging
releaseorhotfixintomain, but it is possible to have conflicts when mergingreleaseormainintodevelop.That's correct, but note you also need PRs with full code reviews for all feature branches into any shared branch, which includes
develop,release, andhotfix.General Git Flow Tips:
releaseintomain, there are some (minor) advantages2 to mergingmainintodevelopinstead ofreleaseintodevelop. Try it, you may like it.--no-fffor these regular merges which is necessary when mergingreleaseorhotfixintomain.--no-ffwhen completing this PR as well. It's better to have an extra unnecessary merge commit than to accidentally flip the first-parent history.1 "Git Flow merges" refers to any merge of one shared branch into another as required by Git Flow. Examples include merging
releaseintomaster,releaseintodevelop,masterintodevelop,hotfixintomaster,hotfixintorelease, etc.2 After merging
releaseintomain, some advantages of mergingmaindown todevelopinstead ofreleasedown todevelop, are: 1.) You don't build up a bunch of merge commits sitting all alone onmainfrom each release. If they build up, when you eventually have ahotfix, all of those lonely merge commits get brought down todevelopall in one shot, which looks kind of strange when you're looking at what commits are new with that merge. 2.) Before mergingreleaseintomain, it may be useful to do a sanity check to confirm thatreleaseis fully ahead ofmain, because if it isn't, then it's probably because there was ahotfixthat someone forgot to merge down intoreleaseand it's about to get blown away. One of the easiest ways to confirm you don't have this problem is to check that the tip ofmainis reachable by thereleasebranch.