Synchronize local repo with remote. Keep or remove changes

To get newest changes from remote while keeping your work:

git stash
git pull
git stash pop

To remove local modifications only:

git reset --hard

To remove local modifications and untracked local files as well:

git reset --hard
git clean -fd

Leave a Reply