Git: Reset local branch to make it the same as remote branch master

Go to your local repository in bash

$ git fetch origin

$ git reset –hard origin/master

To clean and remove untracked files and directories

$ git clean -fdx

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Written by kurinchilamp


Website: http://

Leave a Reply

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

Read previous post:
Git: How to reset Develop branch to be in sync with Master branch?

First checkout Develop branch $ git checkout dev Then, reset it to Master branch $ git reset --hard master Make...

Close