How To Install Git On Azure Virtual Machine
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In this blog post, we will discuss how to install git on Azure Virtual Machine. Git is a fast, scalable, revision control system that serves as a backbone of any modern DevOps architecture. In layman term, git provides a hosting solution for all your code in a distributed and version control environment.
Prerequisites:
One Azure Virtual Machine with internet access.
Git installation on Azure Virtual Machines:
Step 1: Create an Azure Linux based virtual machine with Ubuntu image and connect to the instance.
Step 2: Perform a quick OS update on your VM (optional):
1 |
sudo apt update |
Step 3: Install git in your Azure Virtual Machine:
1 |
sudo apt install git |
Step 4: Check git version
1 |
git version |
Step 5: Setup Git local repository in Azure Virtual Machine:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#create a directory named employee mkdir mygitlocalrepo #get inside mygitlocalrepo directory cd mygitlocalrepo/ #initialize git local repository git init #observe .git file is created in your local git repository which contains data and #metadata of your local git repository ls -a ls -a .git/ #check git status git status #getting help from command line git help #list all git commands and sub-commands git help -a #getting help for a particular git command git help #configure your username and email id git config --global user.name " git config --global user.email " |
Hope you have enjoyed this article. You are now ready to clone/push git repositories.
To install git in a different platform or OS, please refer below git documentation
https://git-scm.com/book/en/v1/Getting-Started-Installing-Git
To get more details on git, please refer below git documentation