I've been working in a branch that has many commits. Once pushed and merged to 'master', what's the best option to revert changes all merged commits from the branch i was working in 'master'?
What about this?
git revert -m 1 <merge-commit>
I've been working in a branch that has many commits. Once pushed and merged to 'master', what's the best option to revert changes all merged commits from the branch i was working in 'master'?
What about this?
git revert -m 1 <merge-commit>
The best way to do this is by first merging your branch in using the --no-ff option.
What this does is create whats called a merge commit for you. If you want to revert the merge, you only have to revert that merge commit. If you don't specify the --no-ff flag, then there may be a chance that it doesn't create the merge commit.