How to install Git in AWS EC2
Hello Everyone
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:
1 2 3 4 5 6 7 8 9 10 11 |
#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 git version |
Setup Git local repository in EC2 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 |
#create a directory named employee mkdir mygit #get inside mygit directory cd mygit/ #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 the command line git help #list all git commands and sub-commands git help -a #getting help for a particular git command git help |
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
https://git-scm.com/book/en/v1/Getting-Started-Installing-Git
To get more details on Git, please refer below git documentation
Thank you for the easy step-by-step instructions.