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.
$ git remote add server ssh://server_hostname:/path/to/git/repo$ git checkout -b temp$ git push server
$ git checkout - # shorthand for previous branch, git checkout @{-1}
$ git branch -d temp
I have more background information here: https://medium.com/@2upmedia/git-push-to-live-server-5100406a26