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?
Asked
Active
Viewed 1.1k times
2 Answers
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:
- Pro Git book.
- Git tutorial code school.
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
-
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