Quantcast
Viewing latest article 43
Browse Latest Browse All 80

Answer by Muhammad Bilal for How do I delete a commit from a branch?

Revert to the Previous Commit Locally

git reset --hard HEAD~1

Force Push the Reverted State to Remote:

git push origin main --force

Note: In above command, main is your branch name


Viewing latest article 43
Browse Latest Browse All 80

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>