GIT overwrite local changes from remote repository.

There are times, when you make a change on your local directory, but want to pull in the changes from the remote branch. If you need the remote branch to over-write uncommited changes on your local working directory you can reset the GIT head to get the latest code from the remote repository.

Use the following terminal command in your local directory where you want the code to be over-written.

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

Here are some Stack Overflow links to help you more.