# Fetch the latest remote changes git fetch origin # Reset local master branch to exactly match remote master git reset --hard origin/master # Optional: remove untracked files and directories git clean -fd # Verify git status