At work we have a git flow where
- developers correct a given defect in the development branch
- then they have to 'put'(*) their correction in the integ
branch
- this integ
branch must be accessible to our customers because they want to check out our code and recompile it themselves
The customer wants a clean branch, ideally with a commit per corrected defect.
But our developers might deliver their work in several commits (one defect corrected by several commits in the development branch)
If we simply merge the development branch into the integ
branch, the client will see in the history all the atomic commits performed by the development guys, which shall be avoided.
Question related to (*):
How can we clean the branch for the customer?
- without imposing a "one commit per defect" rule to the developer
- ideally without cherry-picking and squashing the atomic commits corresponding to each defect in the integ
branch (because cherry-picking duplicates the commits)
Edit:
I don't want to perform a git rebase
interactive and squash the commits from the development branch. It's the developer branch and they split the commits for a good reason from the developer point of view (maybe technically or logically it makes sense to create several commits).
From the client point of view, they don't care about the fact that a defect was corrected by several commits, they want a clean history on THEIR branch