Reputation: 4337
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?
Upvotes: 0
Views: 67
Reputation: 5134
git revert COMMIT_D_HASH
will introduce a commit that reverts the changes in D.
It will still be in the history.
You will end up with:
Revert of Commit D - .....
Commit G - ......
Commit F - ......
Commit E - .......
**Commit D - .......**
Commit C - .......
Commit B - .......
Commit A - .......
Upvotes: 1