Just like any other web hosts out there, you are able to FTP your files using your favorite FTP client. But Azure offers you other options which make our life a lot easier, one of them is by configuring your Azure hosted directory as a Git repository. This allows you to push files to it from any other Git repo such as Visual Studio Online, TFS 2013, GitHub, and even a local repo. This is how you configure your deployments from your local Git repo using Visual Studio 2013:
Create an Azure Website and Configure Git Deployment
Go to your Azure Portal, then click on the Websites, then click on New and select “Custom Create”. This will allow you to configure a database (if any) and specify your deployment source.
As of this moment, the list of sources is: Visual Studio Online, Local Git repository, GitHub, Dropbox, Bitbucket, CodePlex, or any externally accessible Git or Mercurial repository.
Click on next, and the site is created. Back from the Azure portal, you can click on your newly-created site, and select “Deployments”. Here you can see instructions on what you need to do to get your site deployed:
Now time to create a website and deploy to Azure.
Create your new Website locally
Create a local repo and commit your files
Configure the remote repo
Once your files a committed to your local Git repository, you can use the information provided by Azure to configure the remote repository. Clicking on the Unsynced Commits link shows you that your remote repository is not configured yet:
So in my case, I will enter this URL in the remote repo textbox: https://EstebanFtp@estebanblogdemo.scm.azurewebsites.net:443/estebanblogdemo.git, then click on Publish. You will be prompted for your credentials that you configured earlier. And a few short seconds later, you will get a message letting you know that it was all successful:
Now every time I push to my remote repo, my site will get automatically deployed!
Interested in learning more about Git? Check out my new Pluralsight course on Git for Visual Studio Developers!