I pushed to a branch called dev_feature_1
for example, but I'm not supposed to because I'm already finished with feature-1 and I should push to another branch called dev_feature_2
instead.
So I already did push my work to dev_feature_2
successfully, but I want to remove the commit in branch dev_feature_1
as it didn't exist, but I still want my local code to stay the same.
I tried to use revert {hash of the unwanted commit}
but it removed everything from local but the remote remained the same! I had to use reset --hard
to retrieve back my local code.
All I want is like a delete button on the last commit inside the commits list in GitHub.?
[Link](https://stackoverflow.com/a/448929/8116260) – Uzair Apr 22 '21 at 22:31