Git – remove local commits

Posted by Chris Straw on November 7, 2019 in Uncategorized |

When I accidentally merge my branch into develop, I forget the command to remove (reset) any local commits.

git reset --hard origin/<branch_name>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2011-2020 Chris Straw All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.