I have a scenario where there is a master branch, and a feature branch is cut from the master branch.
- Master branch
- Feature branch
all our custom changes to the code are committed to the feature branch for custom configs testing. Meanwhile there will be many commits happening to the Master branch in parallel by other developers.
So after a week or two the I want to get all the new changes from the master branch and git rid of all the commits I made in the Feature branch. i,e want to get my feature branch in sync with latest master without my commits.
I got solution to get the master commits to my feature branch but not very clear solution to get rid of my commits from my feature branch.
My end goal is to sync my feature branch every couple of weeks with master branch and remove all my commits as well, so my feature branch is same as the master.
This can be done simply by deleting the feature branch and creating a new one from master, but we do not have the power to create/delete new branch, so we need to live with a single feature branch for all our custom testing.