Looking at all the ways to revert or reset in Git when dealing with branches, tags, etc...I thought I had a good handle on it but it's getting confusing.
So what is the simplest sequence of commands I need to do the following?
- Revert master branch to an earlier state via a pull request. Presumably, I'd create a feature branch, revert it, and merge it via a pull request. (This revert includes reverting earlier merges.)
- Make further changes in a feature branch. Not sure if it matters for later steps whether I merge to master before and after, or only after.
- Push and then merge to master (via a Pull Request to get it into master, outside of Git)
- Then reinstate the later changes that I rolled back in step 1, resolving any conflicts, and also keeping the changes from steps 2-3.
I started down the road of git --no-commit revert commit-after-the-tag..HEAD
but now I am worried that there will be no easy way to reinstate the changes, since my revert commit will be newer than the changes I want to reinstate. (Also, I'm having trouble reverting as the code to revert includes merges.)
So I think I want to revert to a tag, make further changes, then reinstate all the subsequent reverted changes. How do I do that?