Install Git on your Raspberry Pi

To install Git on your Raspberry Pi, run the following command:
  • df -h
  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install git
  • sudo apt-get clean

The first command “df-h” will give you a chance to make sure that you have room on your “drive” for Installation. This is important because the Apt-get application does not check it before you start! first, you run “sudo apt-get update”. This updates all your repositories for all your applications on all the latest update lists. Then run “sudo apt-get dist-upgrade” to download and install these Packages. It will also remove obsolete packages. We now execute “sudo apt-get install git” to install our git package. The last command (sudo Apt-get Clean) will “remove the trash” and help save space on your “drive”.