{"id":11891,"date":"2022-05-09T15:33:57","date_gmt":"2022-05-09T15:33:57","guid":{"rendered":"https:\/\/blog.cloudthat.com\/?p=11891"},"modified":"2024-06-25T11:01:03","modified_gmt":"2024-06-25T11:01:03","slug":"maintaining-git-projects-azure-repos","status":"publish","type":"blog","link":"https:\/\/www.cloudthat.com\/resources\/blog\/maintaining-git-projects-using-azure-repos","title":{"rendered":"Maintaining GIT projects using Azure Repos"},"content":{"rendered":"<table style=\"height: 177px;\" border=\"3\" width=\"453\">\n<tbody>\n<tr>\n<td>\n<h2><span style=\"color: #000080;\"><strong>TABLE OF CONTENT<\/strong><\/span><\/h2>\n<\/td>\n<\/tr>\n<tr>\n<td><a href=\"#introductiontogit\">1. Introduction to Git<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"#stepbystepguide\">2. Steps to Maintain Git<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"#summary\">3. Summary<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"#aboutcloudthat\">4. About CloudThat <\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"#faqs\">5. FAQs<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"introductiontogit\"><strong>1. Introduction to Git:<\/strong><\/h2>\n<p>Git is a widely used version control system that is distributed rather than centralized or only locally available. Git is extensively used to track, merge, and commit the files for your code deployments from small-scale to large-scale projects. GIT is a vital part of a DevOps lifecycle that helps the developers be updated while working on any project.<\/p>\n<p>Azure Repos helps maintain your code commits and pushes, as well as helps visually analyze your pull requests via a graphical interface and more.<\/p>\n<p>Here you can edit, track, commit, and see graphs and analytics about your code that is pushed into the Azure Repos. It helps you develop new features, fix and review bugs and put tags as per your requirement for point-in-time versioning.<\/p>\n<h2 id=\"stepbystepguide\"><strong>2. Steps to Maintain Git<\/strong><\/h2>\n<h3>a. Connect your local repository to Azure Repos<\/h3>\n<ul>\n<li>To start using GIT in your system, download the GIT bash from their <a href=\"https:\/\/gitforwindows.org\/\" target=\"_blank\" rel=\"noopener\"><strong>official website<\/strong><\/a>.<\/li>\n<\/ul>\n<p>Make sure to check the GIT-BASH installation option while installing.<\/p>\n<h3>b. Starting with Azure DevOps Sign up<\/h3>\n<ul>\n<li>Browse <a href=\"http:\/\/www.dev.azure.com\">dev.azure.com<\/a> to create a free account to use Azure Repos<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11892\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git1.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"606\" height=\"211\" \/><\/a><\/li>\n<li>Sign in with an email account or any other options available<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11893\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git2.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"451\" height=\"216\" \/><\/a><\/li>\n<\/ul>\n<h3>c. Create a new project<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11894\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git3.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"448\" height=\"442\" \/><\/a><\/h3>\n<p>Choose Repos in the left blade and copy the git repository created by Azure DevOps for you<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11895\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git4.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"606\" height=\"239\" \/><\/a><\/p>\n<p>Now open GIT BASH from Start and GIT clone the repo in the location of your choice<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11896\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git5.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"604\" height=\"205\" \/><\/a><\/p>\n<p>Locate to the repo created locally and add a file to the Azure Repos<\/p>\n<pre class=\"copy:false popup:false lang:default decode:true \">Cd demo-project\r\necho \"hello code\" &gt; hello.txt\r\ngit add\r\ngit commit -m \"az-repo first commit\"\r\n<\/pre>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11897\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git6.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"596\" height=\"260\" \/><\/a><\/p>\n<p>Now you can finally push into the Repos to see the changes reflect<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11898\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git7.png\" alt=\"Maintaining GIT projects using Azure Repos\" width=\"602\" height=\"168\" \/><\/a><\/p>\n<p>Now find the committed changes in the Azure Repos in Azure DevOps<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11899\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git8.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"606\" height=\"215\" \/><\/a><\/p>\n<h3>d. Explore other options for maintaining commits<\/h3>\n<p>Try to update the hello.txt file in the Azure DevOps portal only<\/p>\n<p>Find Commits in the left blade<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11900\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git9.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"606\" height=\"215\" \/><\/a><\/p>\n<p>Here you will now see all the details of commits done by a particular branch<\/p>\n<p>Choose the PUSHES tab on the left blade to show the push to the git repository<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11901\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git10.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"571\" height=\"297\" \/><\/a><\/p>\n<p>We also pushed some code using a dev branch you can change the branch name from the top to view the respective commits and pushes<\/p>\n<p>You can create new branches from the branch tab on the left blade<\/p>\n<p>Choose a name for the branch and choose the branch which will be the base for the new branch that will help to pull all pushed information to the new branch.<br \/>\n<a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11902\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git11.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"606\" height=\"253\" \/><\/a><\/p>\n<p>Here in this tab, you will see all the branches, the default branch, and branch, compared to other branches for calculating task behind and ahead status. Every time you do a pull request or a merge request to the compare branch, the behind status will reset for non-compare branches.<\/p>\n<h3>e. Creating Tags<\/h3>\n<p>We can create and assign tags to mark the commit for point-in-time versioning; this helps search for a particular version of your code, such as V1 (version 1).<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11903\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git12.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"305\" height=\"242\" \/><\/a><\/p>\n<h3><span lang=\"EN-IN\">f. Pull Request\/ Merging<\/span><\/h3>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11904\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git13.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"606\" height=\"344\" \/><\/a><\/p>\n<p>You can quickly merge your code from sub-branches to main branches by creating a pull request in the portal<\/p>\n<p>Here make sure to correctly choose the sub-branch to merge with the master or any other sub-branches. You can also add reviewers to approve along with any work items to assign. Finally, you can choose to merge by completing the pull request.<\/p>\n<p>Head over to files in your master branch and see the dev files being pushed into the master branch.<\/p>\n<p><a href=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11905\" src=\"https:\/\/content.cloudthat.com\/resources\/wp-content\/uploads\/2022\/11\/git14.png\" alt=\"Now find the committed changes in the Azure Repos in Azure DevOps\" width=\"606\" height=\"158\" \/><\/a><\/p>\n<h2 id=\"summary\"><strong>3. Summary<\/strong><\/h2>\n<p>By using Azure Repos, you have control over your files and code in a visual format. This also helps in adding different team members to view and merge from their local repository, you can continue to work on your local repository and merge with other branches according to the use case. Moreover, Azure DevOps provide Boards to maintain work items such as Epics, user stories, tasks, and bugs and analyze them. You can further create pipelines with your GIT by using CI\/CD functionality provided in the sections of the pipeline, save artifacts for your code releases in artifacts sections, and much more.<\/p>\n<h2 id=\"aboutcloudthat\"><strong>4. About CloudThat<\/strong><\/h2>\n<p><a href=\"https:\/\/www.cloudthat.com\/\"><strong>CloudThat\u00a0<\/strong><\/a>is also the official\u00a0 Microsoft Gold Partner, AWS Advanced Consulting Partner, and Training partner helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build\u00a0a robust\u00a0cloud computing ecosystem by disseminating\u00a0knowledge on technological intricacies within the cloud space.\u00a0Our blogs, webinars,\u00a0case studies, and white papers\u00a0enable all the stakeholders in the cloud computing sphere.<\/p>\n<p>Drop a query if you have any questions regarding Azure Repos, maintaining Git, or other versioning options, and I will get back to you quickly. To get started, go through\u00a0our<strong>\u00a0<\/strong><a href=\"https:\/\/www.cloudthat.com\/expert-advisory\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_campaign=expert-advisory\"><strong>Expert Advisory<\/strong>\u00a0<\/a>page\u00a0and\u00a0<a href=\"https:\/\/www.cloudthat.com\/managed-services-packages\/\"><strong>Managed Services Package<\/strong><\/a>\u00a0that is<strong>\u00a0<a href=\"https:\/\/cloudthat.com\/?utm_source=blog-website&amp;utm-medium=text-link&amp;utm_campaign=cloudthat.com\/\">CloudThat<\/a>\u2019s<\/strong>\u00a0offerings.<\/p>\n<h2 id=\"faqs\"><strong>5. FAQs:<\/strong><\/h2>\n<ol>\n<li>\n<h4><span style=\"text-decoration: underline;\"><strong>Apart from Azure Repos, what other topics can we discover in Azure DevOps?<\/strong><\/span><\/h4>\n<\/li>\n<\/ol>\n<p>Ans: We can use Azure Boards to create work items, Backlogs, sprint charts, and delivery plans. Moreover, with pipelines, we can create, build, and release pipelines.<\/p>\n<ol start=\"2\">\n<li>\n<h4><span style=\"text-decoration: underline;\"><strong>Are the commit changes\u00a0synchronized\u00a0in the master and local branch after a push in Azure Repos?<\/strong><\/span><\/h4>\n<\/li>\n<\/ol>\n<p>Ans: No, to\u00a0synchronize\u00a0or collaborate the changes between branches, one must use git merge in Git Bash shell or create a pull request in the Azure Dev-Ops portal.<\/p>\n<ol start=\"3\">\n<li>\n<h4><span style=\"text-decoration: underline;\"><strong>How can we utilize tags in Azure Repos?<\/strong><\/span><\/h4>\n<\/li>\n<\/ol>\n<p>Ans: We can create different tags for point-in-time commits in Azure Repos, such as v1, v2, etc. We can also search in the query section of Azure Repos based on tags to show the commits related to the particular tags.<\/p>\n","protected":false},"author":278,"featured_media":12003,"parent":0,"comment_status":"open","ping_status":"open","template":"","blog_category":[3608,3607,3624],"user_email":"akshaym@cloudthat.com","published_by":"324","primary-authors":"","secondary-authors":"","acf":[],"_links":{"self":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/11891"}],"collection":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/users\/278"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/comments?post=11891"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/11891\/revisions"}],"predecessor-version":[{"id":41165,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog\/11891\/revisions\/41165"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/media?parent=11891"}],"wp:term":[{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/www.cloudthat.com\/resources\/wp-json\/wp\/v2\/blog_category?post=11891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}