Janik von Rotz

1 min read

Git pull overwrite local changes

A new year a new post. Instead of a new years resolution I’ve got a git wisdom for you. If you ever have to reset your repository/life use this command:

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

It will fetch the latest changes, reset the local repo and then pull the master branch.

Categories: Software development
Tags: git
Improve this page
Show statistic for this page