Reputation: 1886
Normally, if I had done some work on a feature but will not be able to deploy it to master until some indefinite future time, I'd just put it in a branch and occasionally rebase that branch to the latest changes to master.
Today, I have a situation that does not quite match that common case: I made a change to master a while back, now deep in the history. I've now decided that this change is not appropriate, so I will undo it at in master. However, I do want to save this code in a branch, because it may be relevant someday.
Upvotes: 0
Views: 53
Reputation: 1886
As I wrote this question, the answer became obvious. (Stack Overflow as the ultimate rubber duck debugger?)
I just need to:
git revert
the commit that undid the featureUpvotes: 1