We have a website that has all its PHP/HTML/JS/CSS/etc files stored in a Git repository.
We currently have 3 types of computers (or use cases) for the repository.
Before deploying the local changes, check whether anything has changed on target server.
Add to deployment script to ensure nothing has changed on server:
$ git ls-files -dmo --exclude-standard
Will be empty if there are unchanged files, easier than parsing git status