This script is intended for beginners and advanced coders that want to update code on the live server in the moment they Commit / Push code to the repository.
Just place the script in a folder you choose and point Github or Bitbucket to send it a POST Hook and the script will automatically deliver the code in the server.
The flow will then be Development -> Git Repository -> Live Server.

The current solutions on the market either don’t accept Github or Bitbucket or have a monthly fee attached, this solves both problems!
The commits / push can give from any plataform: Git for Windows, TortoiseGit, Sourcetree, all sources are accepted as long as the hook is configured!