How To Install Git On Google Compute Engine
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In this blog post, we will discuss how to install git on Google compute engine. 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 Google Compute Engine instance with internet access.
Git installation on Google Compute Engine:
Step 1: Create a Google Compute Linux based instance with RedHat or CentOS image and connect to the instance.
Step 2: Perform a quick update on your instance (optional):
1 |
sudo yum update -y |
Step 3: Install git in your Google Compute Engine Instance:
1 |
sudo yum install git -y |
Step 4: Check git version
1 |
git version |
Step 5: Setup Git local repository in Google Compute Engine instance:
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