Rather than FTPing all your updates to your remote development or production server, you can also set up the server to access your remote Git repository and update the site with a simple git command. This way you will ensure all the files have been updated to the exact branch version needed. Below are instructions to help you setup git on your remote server.
Install Git on Server
If git is not already installed on your server, you will need it. The actual command may vary depending on your OS, but something like this should do the trick…
sudo yum install git
Generate SSH Key Pair
@see https://help.github.com/articles/generating-ssh-keys
Setup Remote Repository on Server
- Change directories to the one where you want the site setup
- Initialize git
- Set the remote repo
- Fetch list of branches
- Checkout the branch you want (“develop” in this example)
cd /path/to/site
git init
git remote add origin git@bitbucket.org:YOUR_ACCOUNT/YOUR_REPO.git
git fetch && git checkout YOURBRANCH