{"id":61,"date":"2020-01-07T15:56:24","date_gmt":"2020-01-07T05:56:24","guid":{"rendered":"http:\/\/data-engineer.net\/?p=61"},"modified":"2023-02-04T18:10:38","modified_gmt":"2023-02-04T08:10:38","slug":"setting-up-azure-devops-for-git-version-control","status":"publish","type":"post","link":"https:\/\/data-engineer.net\/?p=61","title":{"rendered":"Setting up Azure DevOps for Git Version Control"},"content":{"rendered":"\n<h2>Problem<\/h2>\n\n\n\n<p>How to set up Azure DevOps for Git Version Control?<\/p>\n\n\n\n<h2>Solution<\/h2>\n\n\n\n<h3>Define Project<\/h3>\n\n\n\n<ol><li>Login to\u00a0<a href=\"https:\/\/dev.azure.com\/\">https:\/\/dev.azure.com<\/a> or sign up<\/li><li>Click &#8220;New Project&#8221;\u200b\u200b\u200b to create a new project. Set the visibility to Private (if needed)<\/li><li>You will have a project tile as below<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"840\" height=\"434\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-3.png\" alt=\"\" class=\"wp-image-62\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-3.png 840w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-3-300x155.png 300w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-3-768x397.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<h3>Set up File Repo<\/h3>\n\n\n\n<ul><li> Go to a project&#8217;s page and navigate to &#8220;Repos\/Files&#8221; section <br><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/ucg1.sharepoint.com\/sites\/bi\/SiteAssets\/Finance%20DW%20Documentation\/Azure%20DevOps%20Procedure\/devops-2.png\" alt=\"devops-2.png\"\/><\/figure>\n\n\n\n<ul><li>The Repo could be used to store any file. Including VS projects, SSMS project, Power BI files or any other file.\u00a0<ul><li>If you are starting a blank project (e.g. a new project in VS), click on &#8220;Clone in VS code&#8221; and continue the set up in VS<\/li><li>If you want to add an existing folder containing an existing project (in VS or else)\u00a0or any file, follow these steps:<ul><li>Install Git for Windows\u00a0<a href=\"https:\/\/git-scm.com\/download\/win\">https:\/\/git-scm.com\/download\/win<\/a><\/li><li>Create a new folder for the project. Like\u00a0C:\\Test\\<\/li><li>Run Git Bash software<\/li><li>Navigate to C:\\Test<\/li><\/ul><\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"289\" height=\"61\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-4.png\" alt=\"\" class=\"wp-image-63\"\/><\/figure><\/div>\n\n\n\n<ul><li>Copy the clone address from DevOps <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"658\" height=\"111\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-5.png\" alt=\"\" class=\"wp-image-65\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-5.png 658w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-5-300x51.png 300w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/figure>\n\n\n\n<ul><li> Run the command &#8220;git clone &lt;clone_address> <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"537\" height=\"65\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-6.png\" alt=\"\" class=\"wp-image-66\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-6.png 537w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-6-300x36.png 300w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><\/figure>\n\n\n\n<ul><li> Now copy your existing files (it doesn&#8217;t matter what they are) to C:\\Test\\ <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"768\" height=\"237\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-7.png\" alt=\"\" class=\"wp-image-67\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-7.png 768w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-7-300x93.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<ul><li>Open Git GUI <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"437\" height=\"376\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-8.png\" alt=\"\" class=\"wp-image-68\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-8.png 437w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-8-300x258.png 300w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/figure><\/div>\n\n\n\n<ul><li>Select &#8220;Open Existing Repo&#8221; and select &#8220;C:\\Test&#8221;<\/li><li>Type a commit message and press &#8220;Commit&#8221;\u00a0<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"879\" height=\"458\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-9.png\" alt=\"\" class=\"wp-image-69\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-9.png 879w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-9-300x156.png 300w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-9-768x400.png 768w\" sizes=\"(max-width: 879px) 100vw, 879px\" \/><\/figure>\n\n\n\n<ul><li> Click Push. Select\u00a0the desired branch and then &#8220;Push&#8221; again <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img src=\"https:\/\/ucg1.sharepoint.com\/sites\/bi\/SiteAssets\/Finance%20DW%20Documentation\/Azure%20DevOps%20Procedure\/devops-9.png\" alt=\"devops-9.png\"\/><\/figure><\/div>\n\n\n\n<ul><li> If the Push is successful, refresh Azure Devop&#8217;s webpage in Repos\/Files and you will see the files there <\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"274\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-10-1024x274.png\" alt=\"\" class=\"wp-image-70\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-10-1024x274.png 1024w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-10-300x80.png 300w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-10-768x205.png 768w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-10.png 1306w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul><li> You can use Git GUI to manage your project&#8217;s version control. <\/li><\/ul>\n\n\n\n<h3>Version Control through VS<\/h3>\n\n\n\n<p> If you are working on a VS solution and need to do the version control, do the following <\/p>\n\n\n\n<ul><li> Connect to the Git Repo by going to Team Explorer\/Connect. You need cloning url to be able to connect <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"365\" height=\"508\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-11.png\" alt=\"\" class=\"wp-image-71\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-11.png 365w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-11-216x300.png 216w\" sizes=\"(max-width: 365px) 100vw, 365px\" \/><\/figure><\/div>\n\n\n\n<ul><li> Click\u00a0on the drop down at the top of Team Explorer <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" width=\"352\" height=\"487\" src=\"http:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-12.png\" alt=\"\" class=\"wp-image-72\" srcset=\"https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-12.png 352w, https:\/\/data-engineer.net\/wp-content\/uploads\/2020\/01\/image-12-217x300.png 217w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/figure><\/div>\n\n\n\n<ul><li>Now you can:<ol><li>\u200bCommit changes (Changes option)<\/li><li>Create\/switch branches\u00a0(Branches option)<\/li><li>Sync\/Push\/Pull (Sync option)<\/li><\/ol><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to set up Azure DevOps for Git Version Control<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[15,16,17,18,19],"_links":{"self":[{"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/posts\/61"}],"collection":[{"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-engineer.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":2,"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":73,"href":"https:\/\/data-engineer.net\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions\/73"}],"wp:attachment":[{"href":"https:\/\/data-engineer.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-engineer.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-engineer.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}