5 Using giHub with the Raspberry - PolytechAngersMecatroniqueClub/Tutorials GitHub Wiki
Using gitHub with the Raspberry
Installing Git
Git can be easily installed with the command
$ sudo apt-get update
$ sudo apt-get install git
Initializing the git folder
Create a directory
$ mkdir ~/myGitHub
Initialize the git repository by doing
$ cd ~/myGitHub
$ git init
Voilà, the git repository is initialized.
Getting a repository from gitHub
To recover a repository from gitHub, go to your myGitHub folder
$ cd ~/myGitHub
and close the gitHub repository by doing
$ git clone https://github.com/PolytechAngersMecatroniqueClub/US_Board.git
Note that this is to clone the US_Board repository, change the url with the repository you want!
Now you should have a US_Board folder into your myGitHub directory.
Some useful commands
Note that the following commands have to be executed in the repository folder (in US_Board folder for instance) To add all the files to the repository
$ git add *
To get the current status of the repository (what has been commit, the last modifications)
$ git status
Commit the repository
$ git commit -a -m “Text for the commit”
To push the commit to gitHub
$ git push
To update your repository with the one on git hub
$ git pull