You will have to do a hard reset your local repository to the correct commit and then do a force push to bring your remote back in to sync with your local copy. Be aware this could ave a big impact on any colleagues who have already fetched the two commits you want to remove.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events