I have 2 git branches master and develop. master is production ready and develop is live development branches. I opened a PR to merge develop changes into master which had changes and commits which does not suppose to go in production. Since this PR is merged into master with multiple commits from multiple developer how i can revert it back to its original state?
Thanks
You can either do the reset branch to specified commit
And then push your changes - it will require force push permissions tough. Here's a nice explanation on how it works - How do I use 'git reset --hard HEAD' to revert to a previous commit?
Your other option is to just create a new master branch, basing on last good commit of your current master branch.
And of course you can just revert all the commits, but this would mess up your git history