2017 February

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

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 sure to push the changes by force to make origin/dev to be the same as origin/master
$ git push –force origin develop

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