How to install git on Ubuntu 14.04/16.04 LTS?
Update the packages:
1 2 |
## Update packages sudo apt-get update -y |
Install Git:
1 2 |
## Install git sudo apt-get install git -y |
Check if Git installation was successful:
1 2 3 4 |
## Check if git was installed successfully git --version ## should return an output |
Configure and use git:
1 2 3 4 5 6 |
## configure git with your username and email id git config --global user.name " git config --global user.email " ## Create your 1st local git repository git init |
How to install git on Ubuntu 18.04/20.04 LTS?
Update the packages:
1 2 |
## Update packages sudo apt update -y |
Install Git:
1 2 |
## Install git sudo apt install git -y |
Check if Git installation was successful:
1 2 3 4 |
## Check if git was installed successfully git --version ## should return an output |
Configure and use git:
1 2 3 4 5 6 |
## configure git with your username and email id git config --global user.name " git config --global user.email " ## Create your 1st local git repository git init |