Hardware Reference
In-Depth Information
Version Control with Git and GitHub
This section will provide one way to set up your development environment using Git and GitHub. It will drill into the
details of how to perform project management in a social-coding world. GitHub at its core is the code repository that
allows for version control.
Version control , or revision control , tracks every change made to software, including who made the change and
when it occurred. This allows for multiple people to work on software simultaneously and merge the changes into the
master code base. The tool at the heart of this is Git.
What Is Git?
Git is a powerful version control system that is used with many open source projects, including Linux Kernel, which
has thousands of contributors and projects. Among the projects tracked with Git are Arduino software projects and
projects from Adafruit Industries. The Git tool, which is a version control system that is completely distributed, allows
for a massive amount of code hacking by multiple developers across the world. Everyone with a copy of the repository
has a complete copy of the entire project with its entire revision control history. What is really unique with this is that
developers are encouraged to fork the project and make their own changes to it.
Each copy of the software is either a clone or a fork. A clone is a copy of the master online repository on
http://github.com/proard/hellogithub ; you will use a clone of your project locally on your computer. A fork is an
online official copy of the repository, one that you maintain on your own GitHub account, at http://github.com/
youraccount/hellogithub . Git allows for a highly trackable and secure communication process between repositories.
You can send cryptographically signed changes between you local repository and your remote repository. This
supports secure development and accountability for who, where, when, and what changed.
Here, I will cover the basic starting commands and the preferred development process supported by the Arduino
community. GitHub provides a nice starting guide at http://help.github.com , as well. The steps presented here will
be similar to those from the guide, but they will be geared toward starting your own Arduino projects.
Installing Git
First, you must install Git locally and create an account on GitHub. Check out the “Get Started” section on GitHub,
at https://help.github.com/articles/set-up-git . The command-line version of Git can be obtained from
http://gitscm.org/ and should be installed as you would any software. I recommend selecting the shell options
for Windows. The Git shell makes it easy to access Git on the command line. There is also a GitHub GUI tool for
managing Git repositories which is helpful, but not a replacement for all of the features that come with the Git
command line software.
One additional feature of Git is that it is cryptographically signed, and every commit and change clearly trackable,
and makes programmers accountable for the changes they make. You will need to configure a unique key for your
system. To get started, you'll need to do the following:
1.
Install Git.
Create GitHub account at http://github.com .
2.
3.
Generate a key pair to authorize your commits.
https://help.github.com/articles/generating-ssh-keys#platform-mac
Mac OS X: Go to
https://help.github.com/articles/generating-ssh-keys#platform-linux
Linux: Go to
https://help.github.com/articles/generating-ssh-keys#platform-windows
Windows: Go to
Set your user and e-mail in Git at http://help.github.com/git-email-settings .
4.
 
Search WWH ::




Custom Search