Hi!
I'm using BitBucket to maintain a company code base with the following structure:
Staging <-- new code goes here as delivered from development
Master <-- staging gets merged to here as "gold" code
My problem is that if my company decommissions a code module, and we remove it from staging, the merge will also remove it from master (and yes, I understand this is working as designed). But that means if I need it back or need to provide a copy to audit, I have to hunt through the commits for the most recent copy. I need suggestions on how to do something like this:
On merge from staging to master,
If code is new or updated in staging
Merge to master
Else if code is deleted from staging
Move code from master to decommissioned
Can someone help with how to do this?