- Git Tutorial
- What is Git
- Git Tips
- Terminal & GitHub
- Git Hooked on Git Hooks
- Git Stash
- The GitHub Development Workflow
- Simple Rules for Git and Github
- Understanding Git Bisect
- 10 Git Commands You Should Know
- Git Commit messages guide
- Elegant READMEs
- git rebase in depth
- Git basics - the only introduction you'll ever need!
- Stop writing bad commit messages
Install git on OSX with:
Install git on Linux with:
Download and install GitHub Desktop.
Cloning a Repo¶
Clone a repo from Athenian Robotics with:
To find the URL for a particular repo, go to it's github page and
click on the
Clone or download button and copy the URL in the pop-up
window. If your firewall blocks port 22, make sure that the repo URL begins
https:// and not
You can toggle between the two versions by clicking on
Use HTTPS and
Setting up a Host Repo¶
If a Raspi does not have access to github.com (like on an FRC robot), then creating a host repo will make it much easier to update code on the Raspi.
Create a bare repo and a directory for holding code on the Raspi for myproject :
1 2 3 4 5
Add a post-receive git hook that will trigger a
into /home/pi/git/myproject whenever a
git push is done to /home/pi/git/myproject.git.
File changes in /home/pi/git/myproject will not be committable because that directory is
not a cloned repo.
Edit /home/pi/git/myproject.git/hooks/post-receive and add:
1 2 3
echo will be sent back the user as part of the
git push CLI response.
- Make the hook executable with:
chmod +x /home/pi/git/myproject.git/hooks/post-receive
On the development machine, clone myproject from github and add the Raspi myproject.git directory as a remote repo with:
1 2 3 4
You can now push updates from your development machine to the Raspi with:
In the case of FRC, you would push to origin when your development machine is connected to a network reaching github.com and push to raspi when connected to your FRC robot network.