Sometimes it’s some time since u have added a repo to Azure and there are several ways to do this. I wrote this short note as a note to self when I need to do this.
This is currently my preferred way, this requires git commandline tool installed on your computer.
First, create your repo in Azure in the project, select a repo in the left menu, and then new in the top right.
Call the repo something nice, I often use the pattern which I use for the project names and namespaces in c#. Like “Company Name”.”Functionality”.”Type”
Like DigitalMeasurements.Sync.WebJob, u can choose what u want.
When this has been done, select the repository, and then in the upper right corner select Clone.
Copy the clone URL of the repo to the clipboard.
Now move to your computer and go to where u want to work with your project.
Open a command line here.
Write "Git clone "URL" and press enter.
Put the files that u want to have under revision control in the folder which was created during your file cloning or start working on your project here.
Then when u want to put your files under revision control write:
git add .
And then:
git commit -m "initial commit"
and finally
git push --all
This is how I do it currently, it is also possible to choose Clone and “open with” in the Azure repo. Which I used to use, but it did not always seem to work smoothly.
Comments