I am interested in how can I remove a local commit(i.e. a commit which is not pushed to the remote) without loosing the changes contained by it.
What I did : - committed my local changes(I never pushed it to the remote) - reverted that commit - checked if I still have the changes After performing all of the above steps I realized that my local changes were lost. I had to revert the revert commit in order to get them back.
My question is : Which is the proper way for removing a local commit without losing the changes included in it?