To work with this tutorial, you’re going to need a few things:
Git, of course. Install this by going to the git homepage,
git-scm.com. On Linux, you probably already have git,
or you can install it with sudo apt-get install git-all or
sudo yum install git.
A graphical git client or browser. This lets you visualise your git
history more easily, and understand the concepts behind git better. For a
full list of clients, see here. On Mac,
I recommend Git Tower, though it’s not free. The
cross-platform SourceTree is free and
available on Windows and Mac. On Linux, try gitg or gitk.
A text editor. Try Sublime Text
or Atom (both of which are multiplatform). Configure them
to be your default git editors by following the instructions on
this page.
Note: programs like Microsoft Word or TextEdit are not valid text editors
here because they don’t produce plain text files, but rather more elaborate
file formats that include text formatting information.
A GitHub account. Create an account by going to
github.com.
SSH keys to access GitHub. Without these, you will need to type your
GitHub password every single time you try to do read from or write to your
GitHub account. (Which will be many, many times! ;) Follow the instructions
here, making sure
that you are seeing the instructions for your OS (Mac, Windows, or Linux).
Notes
When typing a passphrase, it might seem that the keyboard isn’t working.
However, this is just a security feature (similar to the *s you might see
when typing a password on the web). Just go ahead and type the passphrase,
then repeat it as requested.
For Windows users: Windows does not have an ssh agent running in the
background by default. If you see the error:
you will need to use this command to start the ssh-agent:
(Be careful to use the proper backtick symbol, usually just above the “Tab”
key on most keyboards; NOT the single quote/apostrophe character.)
Then type:
(You might need to change the filename from id_rsa to the whatever you used.)
See this StackOverflow answer for more
info.
You need to keep the window on which you launched the ssh-agent open.
Setup
Additionally, you’ll want to set up git so that it knows your full name and
email address. Fire up a console/terminal, and type:
(Use the same email you used for your GitHub account.)
The following command also lets you see a rudimentary graphic of your history
without needing a GUI git client:
Then you can get a nice history within your terminal by typing:
Whew! That’s quite a lot of stuff! But I hope by the end of the tutorial you’ll
find it all useful and worth getting! (Plus: free stuff!)