I have a website using git
The setup has the master branch as the live site and a develop branch as the dev domain which is used for testing features before they go live
No work is ever done directly on master or develop, it's always done on feature branches and then merged in to develop for testing, followed by master to go live
My issue is that I have one site which has had a lot of work merged in to the develop branch which is never going to go live
I've been asked to make the develop branch match the master branch to ensure the work that's never going live doesn't affect the testing of other new features that get merged in to develop
I've done a bit of research and from my understanding, I can't use rebase as that's more for updating a branch with commits made since you branched off
The only option that seems to do what I need is to rename the develop branch and then recreate it from master and force a push to update it remotely
Is this my best option? Or is there another way I don't know about? Or maybe rebase is correct but I'm not quite understanding its purpose?
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…