Git Client for Raspberry Pi

Image for Git Client for Raspberry Pi
Tinkerer: Lory Livezey

GitHub is a repository for open source software and libraries that allows people to share their code, as well as a way to keep track of changes that happen, a process called <code class="language-bash">source control</code>. The Raspberry Pi can act as both a client (can download from these repositories) as well as a server (store repositories that others can download). In this tutorial, we'll learn how to set up both.

Previous Step

  Configuring Raspberry Pi After Installing Raspbian #tt2

If you are using Windows, refer to this tutorial:

  Installing Git For Windows

If you use a Mac, you can download Git for Mac here:

[Git Download}(

What you will need

(Or Larger)

Installing Git on Raspberry Pi

Installing Git on the Raspberry Pi is easy:

sudo apt-get install git

Once installed, test it by getting the version:

git --version

If you get a git version, you're good to go!

![Git Version}(http://

Clone a Library

You may have used open source libraries on GitHub, and noticed there are two options. You can download the Zip file or you can clone it to a directory on your computer:

![Git Version}(http://

Copy the link to your clipboard, then remote into your Raspberry Pi using Putty or VNC. Make sure you're in a directory where you want to clone the library, such /home/pi:


Run this command:

git clone

When you type ls again, you'll find the new cloned directory:

![Git Version}(http://

Install the Library

There are often other tasks you'll need to do in order to make the library work. You'll usually find instructions on the GitHub page. For instance, the Adafruit Library that we cloned above instructs you to install some other libraries and then run the install program in the cloned directory.

There will be many examples of using Git Client on the Raspberry Pi in the upcoming tutorials. This was just to make sure that you're all wired up and ready to do that!

Next Up

The Raspberry Pi can also be used as a Git Server. So it can hold a copy of your (or others') respositories that you can store locally and install them when you need them. Join me for that and other tutorials about the Raspberry Pi.

Be sure to subscribe to our channel!