Problem Statement:
I have 2 main branches: master(PROD) & dev(UAT). Whenever my team receives a change request on the application, we create a branch from master do our changes, and before merging the branch into master, we do "git pull origin master", so that our branch code must be in sync with master code.
At starting of February, my colleague merged a branch into master. But here the branch was not created from master. So the master got polluted. I reverted the changes but the revert was not proper. What I did was "git revert -m 2". After the revert commit, there are 3 merge commits on master.
I have the last commit id till where the master branch was not polluted. My main concern is that I want the master to be clean.
Questions:
- How to get back to the commit which will make the master clean?
- There are branches which are in sync with polluted master. How to clean the master in such a way that reverted actions of master applies to the branch as well?
Thanks in advance.
PS: I don't have any GUI tools.