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

Answer by Dean Christian Armada for Delete commits from a branch in Git

$
0
0

For me rebase did the trick

$ git rebase -i HEAD~98# Delete everything except for the most recent commit on the shown editor caused by "rebase"$ git push origin -f production-static

NOTE:After forcing the push to reduce my comments. I then pushed another set of files and then I tried pulled with the same "repository & branch" on another computer. Surprisingly there is no conflict. This became my way to reduce repository size while avoiding pull conflicts on my other locals that uses the same git


Viewing all articles
Browse latest Browse all 80

Trending Articles



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