I have already pushed all the changes to the server.
Here is the order of my commits to the server :-
Commit G - ......
Commit F - ......
Commit E - .......
**Commit D - .......**
Commit C - .......
Commit B - .......
Commit A - .......
Commit G is the one I need to release. But Commit D is buggy I have to get rid of it from this release. but at the same time I don’t want to delete it completely I need to keep Commit D for later use.
How will i do it using git?
git revert COMMIT_D_HASHwill introduce a commit that reverts the changes in D.It will still be in the history.
You will end up with: