I was going to test something in dev branch (just a version number 0.1 --> 0.2), so I committed the change but I don't have the permission to push it to dev directly,then I created a feature branch and I found the number is already 0.2, then I changed it to 0.3 and pushed this branch, then created a merge request to merge it into dev.
I'm new to git, just wondering how can I prevent this kind of messy in the future? How can I revert my commit after the push being rejected?