Azure, Cloud Computing, DevOps

5 Mins Read

Maintaining GIT projects using Azure Repos

TABLE OF CONTENT

1. Introduction to Git
2. Steps to Maintain Git
3. Summary
4. About CloudThat
5. FAQs

1. Introduction to Git:

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.

Azure Repos helps maintain your code commits and pushes, as well as helps visually analyze your pull requests via a graphical interface and more.

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.

2. Steps to Maintain Git

a. Connect your local repository to Azure Repos

Make sure to check the GIT-BASH installation option while installing.

b. Starting with Azure DevOps Sign up

c. Create a new project
Maintaining GIT projects using Azure Repos

Choose Repos in the left blade and copy the git repository created by Azure DevOps for you
Maintaining GIT projects using Azure Repos

Now open GIT BASH from Start and GIT clone the repo in the location of your choice
Maintaining GIT projects using Azure Repos

Locate to the repo created locally and add a file to the Azure Repos

Maintaining GIT projects using Azure Repos

Now you can finally push into the Repos to see the changes reflect
Maintaining GIT projects using Azure Repos

Now find the committed changes in the Azure Repos in Azure DevOps
Now find the committed changes in the Azure Repos in Azure DevOps

d. Explore other options for maintaining commits

Try to update the hello.txt file in the Azure DevOps portal only

Find Commits in the left blade

Now find the committed changes in the Azure Repos in Azure DevOps

Here you will now see all the details of commits done by a particular branch

Choose the PUSHES tab on the left blade to show the push to the git repository

Now find the committed changes in the Azure Repos in Azure DevOps

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

You can create new branches from the branch tab on the left blade

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.
Now find the committed changes in the Azure Repos in Azure DevOps

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.

e. Creating Tags

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).

Now find the committed changes in the Azure Repos in Azure DevOps

f. Pull Request/ Merging

Now find the committed changes in the Azure Repos in Azure DevOps

You can quickly merge your code from sub-branches to main branches by creating a pull request in the portal

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.

Head over to files in your master branch and see the dev files being pushed into the master branch.

Now find the committed changes in the Azure Repos in Azure DevOps

3. Summary

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.

4. About CloudThat

CloudThat is also the official  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 a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

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 our Expert Advisory page and Managed Services Package that is CloudThat’s offerings.

5. FAQs:

  1. Apart from Azure Repos, what other topics can we discover in Azure DevOps?

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.

  1. Are the commit changes synchronized in the master and local branch after a push in Azure Repos?

Ans: No, to synchronize or 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.

  1. How can we utilize tags in Azure Repos?

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.

WRITTEN BY Akshay Mishra

SHARE

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!