Git, gitHub, Azure and Visual Studio

Preview:

DESCRIPTION

Going from a Git local repository to a published web site on Azure passing through GitHUb and Visual Studio

Citation preview

Git, GitHub, Azure and Visual Studio

Salvatore Sorrentino

Install Git

http://git-scm.com/downloads

A wonderful console command

A not so great UI (an invitation to use the console)

git init

Add and commit

Create a new web site on the Azure portal

Set up deployment from source control

The Git Archive on Azure is ready

The push on Azure

git remote add azure https://theaddressgivenbyazure.azurewebsites.net

git push azure master

The push was alright!

Azure notification

Example: download Bootstrap code

Copy Bootstrap archive on our repository and push again

git add css/*

git add fonts/*

git add js/*

git commit –m «Adding bootstrap libraries»

git push azure master

Push Again on Azure

Azure Notification

The result…

http://provesugit.azurewebsites.net/

Let’s use Github (create a repository)

Clone the Github repository on our hard drive

Copy all the files created in our previous example and push them on Github

Everything is on GitHub now

Go Back to Azure and create a new site

GitHub asks for a confirm…

Azure asks for the repository to clone

Azure extracts the code from GitHub

Azure notifies everything is ok

The Magic…

Make a change in a file belonging to your local repository

Push it to Github

The modification will be automatically pushed to Azure

Visual Studio: clone the code

Visual Studio: Push the modifications

Everything is synchronized

Have fun!

http://www.salvatoresorrentino.it

http://datascienceandprogramming.azurewebsites.net/

http://dotnetcampania.org/blogs/salvatore/