TABLE OF CONTENT
|1. Introduction to Git|
|2. Steps to Maintain Git|
|4. About CloudThat|
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
- To start using GIT in your system, download the GIT bash from their official website.
Make sure to check the GIT-BASH installation option while installing.
b. Starting with Azure DevOps Sign up
- Browse dev.azure.com to create a free account to use Azure Repos
- Sign in with an email account or any other options available
Locate to the repo created locally and add a file to the Azure Repos
echo "hello code" > hello.txt
git commit -m "az-repo first commit"
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
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
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
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).
f. Pull Request/ Merging
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.
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.
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.
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.
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.