We have a simple workflow with three main branches
staging
i.e the test environment
master
i.e the production environment
dev/XXX
where XXX is the ticket number
- Clients log tickets
- we create a branch e.g
dev/2332
- we work + commit + push
- we merge the work when ready into
staging
- client approves the work on
staging
- we merge the work into
master
and ticket is deployed on production
The problem:
If multiple developers are working on their respective dev/XXX
branches;
when they merge into staging
, sometimes, they create conflicts. They fix those conflicts on staging and push.
The problem is when the client approves those specific tickets and we merge the work into master
, we have to fix the conflicts again
Important:
- we cannot merge staging into master -- because of unapproved tickets
- all branches by default are created from the latest master
- multiple tickets are being developed simultaneously but are deployed when approved
- rebasing from master to avoid conflicts is only an option if the work has been approved + deployed already
- rebasing from staging is not an option -- because of unapproved tickets
Any ideas on how to fix this issue? Is our workflow flawed? Are we missing some git hack?
Basically, I do not want the team to repeat the same thing twice
Thank you