I have been working on a project using git. I have two branches master and feature. With the time I added more commits to the feature branch. And the feature branch is 5 commits ahead of master.
Now, I want to make the feature branch 'master'. And the master branch to a normal branch. There is a way to replace master branch with another branch in here using ours merge strategy, but the commits of the previous master are lost because the feature branch overrides them.
Is there a way to switch the master branch and the feature branch without loosing the commits of both branches?