You should have a formal Code Review (in this case a Pull Request) when both of these conditions are true:
- The base (or target) branch is one of the Git Flow shared branches. (e.g.
develop
, release/*
, hotfix/*
, main
)
- The source branch is not one of the Git Flow shared branches. (e.g. feature branches)
As for how to perform the standard Git Flow merges, such as release
into main
, main
into develop
, etc, you could also use PR functionality for this, but they do not need formal code reviews because all the code being merged (should have) already been code reviewed in order to get into the shared Git Flow branches. You may still wish to do sanity checks though, and if you have any gated check-ins it wouldn't hurt to let them run to make sure the merge didn't have some unintended side effects. Eventually you may wish to automate these merges, however, even if you do automate them, you'll still have to occasionally do them manually when there are conflicts. (Merging release
/main
into develop
is usually when conflicts will occur.)