How to install Git in AWS EC2
Welcome to CloudAffaire and this is Debjeet.
In this series, we will explore one of the most popular distributed version controlling tool Git. In this demo, we will install Git in AWS EC2 instance and setup our 1st local Git repository.
What is Git?
Git is a fast, scalable, revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
Git installation on AWS EC2 instance:
#Create an EC2 instance with Amazon Linux 2 with internet access
#Connect to your instance using putty
#Perform a quick update on your instance:
sudo yum update -y
#Install git in your EC2 instance
sudo yum install git -y
#Check git version
Setup Git local repository in EC2 instance:
#create a directory named employee
#get inside mygit directory
#initialize git local repository
#observe .git file is created in your local git repository which
#contains data and metadata of your local git repository
ls -a .git/
#check git status
#getting help from the command line
#list all git commands and sub-commands
git help -a
#getting help for a particular git command
git help <command> # for example, git help init will provide details of git init command
Hope you have enjoyed this article. In the next blog post, we will discuss some basic concepts of git through commands.
To install Git in a different platform, please refer below git documentation
To get more details on Git, please refer below git documentation