If you have SSH access to the servers then this isn't actually too hard, there are a few things you need to make sure though
1) Your source code will work on the server. Sounds obvious but your code needs to work 'as is' on the server and any custom config files must be gitignored (including files generated by any install scripts). Otherwise anytime you try to do a git pull you will have unstaged files
2) Further to the above you need to think about security. If you have install scripts in your repo then you may need to have them in a non-accessible folder (ie not in public_html) and then copy them into public_html to run the install (and then delete them so you don't have unstaged files)
Once this is done, there are a few more things to do:
1. In order to do this if you can connect to the server via SSH then you need to setup SSH keys for the server to authenticate with github/bitbucket (I'm not familiar how this works for bitbucket)
2. Setup a git repository and pull. One thing to note here is that git may not be available via the 'git' command, you may need to use usr/bin/git or similar (ask the hosts)
Code:
git init
git remote add origin REPONAME
git pull origin master
3. You may also need to run some chmod commands in order to get the file permissions running correctly.
If you are happy to manually deploy ) then everytime you do a git commit & push you just need to SSH connect to the server and run git pull origin master. However if you want automatic deployment then this is more complicated. In short there are several ways and looking on stackoverflow will give you multiple solutions.
Of course, this is just the way I have been doing things for a few projects, there are many ways of doing it. One quick note is that I have a 'public_html' inside my repository so that none of the git files are available in a publicly accessible directory.