-3

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?

Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
Ashton Cross
  • 1
  • 1
  • 1
  • 1

2 Answers2

5

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:

Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
1

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

Ghanima
  • 15,837
  • 15
  • 61
  • 119
Milliways
  • 59,840
  • 31
  • 101
  • 209
  • 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. https://www.youtube.com/watch?v=3YmMNpbFjp0 – Ashton Cross Jan 02 '17 at 02:24