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

  1. Change directories to the one where you want the site setup
  2. Initialize git
  3. Set the remote repo
  4. Fetch list of branches
  5. 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
0 0 votes
Article Rating
in Git
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments