Git deployments are very useful as they allow for a developer to deploy a web app from a code commit, and it is a nice way of developing as opposed to copying files via FTP.

As with everything on Azure – it is very easy to do.

An empty web app has been crated (New -> Web App).

To enable git deployments, navigate to the properties of the newly created web app, and click on “Deployment Options”.

Click on “Choose Source” . From this, you can select a number of different deployment options, such as linking the web app to a TFS repository,  a BitBucket account, or even One Drive. We are going to deploy to a local git repository.

To do this, select “Local git Repository” from the menu and click OK.

Screen Shot 2017-02-13 at 22.56.51

Once completed, under the properties section of the web app, click on “Properties”. Navigate to the “GIT URL”, and copy it.

Screen Shot 2017-02-13 at 22.58.38

Next step is to open a git command line and run git clone with the newly created git URL.

Screen Shot 2017-02-13 at 23.03.10

To illustrate the process, a simple index.html file is created and dropped into the new folder. This code is then added to the repository.

Screen Shot 2017-02-13 at 23.10.06

Once this deployment has finished, if we refresh the page, our changes are already present.

Screen Shot 2017-02-13 at 23.12.29