Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee
Showing posts with label Git. Show all posts
Showing posts with label Git. Show all posts

Monday, March 30, 2020

How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint

March 30, 2020
How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint
How To Install Git and Git-Gui on Ubuntu 18.04 LTS, Debian and Linux Mint

Offically Website of GitHub
https://github.com/git/git

Offically Website of Git
https://git-scm.com/downloads

Method 1
Installing Git
Step1 :- sudo apt update
Step2 :- sudo apt install git  OR  sudo apt-get install git-gui

Verify
Step3 :- git --version

Method 2
Installing Git from Source
Step1 :- sudo apt update
Step2 :- sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
Step3 :- cd /tmp  OR  cd /usr/src/
Step4 :- sudo wget https://github.com/git/git/archive/v2.26.0.zip -O git.zip  
      OR sudo wget https://github.com/git/git/archive/v2.26.0.tar.gz -O git.tar.gz    
Step5 :- sudo unzip git.zip
      OR sudo tar -xf git.tar.gz
Step6 :- cd git-*
Step7 :- sudo make prefix=/usr/local all
Step8 :- sudo make prefix=/usr/local install
 
ERROR
cache.h:21:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
Makefile:2387: recipe for target 'fuzz-commit-graph.o' failed
make: *** [fuzz-commit-graph.o] Error 1

SOLUTIONS   
Step1 :- sudo apt-get install libz-dev
Step2 :- sudo apt install zlib1g-dev

Step9 :- git --version

Clone the Git
Step10 :- cd ~
Step11 :- git clone https://github.com/git/git.git  OR  git clone https://github.com/git/git
Step12 :- cd git
Step13 :- sudo make prefix=/usr/local all
Step14 :- sudo make prefix=/usr/local install

Configuring Git
Step15 :- git config --global user.name "Cloud Network"
Step16 :- git config --global user.email "itcloudnet@gmail.com"

Verify
Step17 :- git config --list

configuration file of Git
Step18 :- nano ~/.gitconfig