Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I move "decommissioned" files into a separate branch

Doug Wursten
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2024

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?

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events