Quantcast
Channel: How do I delete a commit from a branch? - Stack Overflow
Viewing all articles
Browse latest Browse all 80

Answer by Lava Sangeetham for How do I delete a commit from a branch?

$
0
0

Take backup of your code in to temp folder. Following command will reset same as server.

git reset --hard HEADgit clean -fgit pull

If you want to keep your changes , and remove recent commits

git reset --soft HEAD^git pull

Viewing all articles
Browse latest Browse all 80

Trending Articles



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