Git fetch (very) hard

When you play a lot with branches and kind of keep track of what should or shouldn’t be merged between them, there’s kind of a magical set of commands to force-overwrite your code with a specific branch:

git fetch --all
git reset --hard origin/master

Make sure you have commited all your changes to some branch before you do it 🙂

It's only fair to share...Share on Facebook
Tweet about this on Twitter
Share on LinkedIn
Share on Tumblr
Email this to someone
Posted in:

Leave a Reply

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