I've been using people's code from GitHub for a couple of years and without it, I'd be totally stuck in my various projects. I want to give back.
I had a mixture of confusion and laziness around how GitHub works, which got in my way. I eventually figured it out, but it took some bumping around.
This Instructable will explain the basics of creating a Git repository, how it works and how to upload it onto GitHub.
I'll be using the commands from the Terminal application on the Mac, but the principles can be extended to other platforms as well.
What is Git vs. GitHub?
Git is a source code version control system, which a series of "commits" or snapshots of your code. You make the commits manually.
GitHub is a website (github.com) where you can publish your Git repositories for public download and possible collaboration.
First, you'll want to register for a GitHub account. You can create as many repositories you want, as long as they are public. Anyone can download your public link and use your code and contribute to the archive. I usually don't upload a repository (a.k.a. a "repo") unless I'm at a good point with the code and ready to make it public.
The sample code I'm using here is called lenenbot, which is a Twitterbot that mixes John Lennon with Vladimir Lenin quotes. It takes the first half of one and mixes it with the second half of another.
Specific Steps on the GitHub site
Go to the Repositories tab
Click on the green New button, which will bring up this dialog
Enter a name for your source code repository
Select the Public radio button
Enter a 1-sentence description
Check the Initialize the repository with a ReadMe file
Choose the green Create Repository button
Now, you have an new repository. A default README.md file will be displayed in GitHub