I need to get git (https://git-scm.com/downloads) on my computer so I can download a repository onto my Raspberry Pi from GitHub. Does anyone know how I can do this?


Assuming you are using Raspbian on your Pi, the folllowing command will install git:

sudo apt-get install git

depending on the version of Raspbian you are running this may already be installed.

You will then want to set some basic configuration values by entering the following at the command line:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com 

substituting your name and email in the above commands.

You should then be able to git clone the repository with the following command:

git clone URL_of_the_repository

replacing URL_of_the_repository with the URL of the repository you want to clone. You can find this URL on the homepage of the repository.

You can learn more about git from the following resources:


I thought git was already included in Raspbian (you don't actually tell us what you are using). If not sudo apt install git

  • Well, it would make sense if it was. I did not know if so, because im having some trouble with turning on my pi, so i was planning to use git to get my work on there and test from there. I'll try it tomorrow when i should get it working. youtube.com/watch?v=3YmMNpbFjp0 – Ashton Cross Jan 2 '17 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.