I came here looking for a simple way to add existing source files to a GitHub repository. I saw @Pete's excellently complete answer and thought "What?! There must be a simpler way."
Here's that simpler way in five steps (no console action required!)
If you're really in a hurry, you can just read step 3. The others are only there for completeness.
- Create a repository on the GitHub website. (I won't insult your intelligence by taking you through this step-by-step.)
- Clone the new repository locally. (You can do this either through the website or through desktop client software.)
- Find the newly cloned repository on your hard drive and add files just like you would to a normal directory.
- Sync the changes back up to GitHub.
- That's it!
Done!