Put Your Code Out There
So, you have learned programming and made something. Cool!
The next step is to put that code out there in the open.
Wait, I don’t get it. Why would I want to share my code with the world?
- Making your code public makes you accountable.
- Other people may find bugs or suggest features to improve your project.
- Having some publicly visible code makes you stand out.
- Your GitHub profile is your new resume.
Afraid of what people might think?
I’m going to let you in on a little secret. Everybody is!
Every one of us has been in your place. That one constant fear. The fear of being criticized. But I can tell you this. It gets better with time. Trust me!
What’s the fuzz about GitHub, anyway?
GitHub is not just another website. This is a place where you can store your code in the cloud and have access to it anytime anywhere.
GitHub is a social network for developers. You can showcase your work, share the code, get feedback and work (collaborate) on other people’s projects.
For the curious minds: It can also host your static website for FREE!
- Create a GitHub account here
- Choose the free plan and finish the sign up process
- Get the Student Developer Pack here
- Follow this quick (15 min) tutorial
Publishing Your Code
- Create a new repository (a repo is like a folder) here
- Fill out the name (I will refer to it as [repo-name] later) you’d like for your project and check the README box. (If you’d like to explore more, go here for an overview about the different types of licenses available. More than often, you’d want to use the MIT License, which allows anyone to do anything with your code as long as the initial copyright notice is kept intact.)
Note: You may choose to not add any license, but then you retain all copyright to your code and nobody can do anything with it.
- Download git for Windows here. On Linux, use the following command:
sudo apt-get install git
- Set your name and email address as follows:
git config --global user.name "John Doe"
git config --global user.email firstname.lastname@example.org
- If you’re behind a proxy server, run the following commands:
git config --global http.proxy http://user:pass@proxy:port
git config --global https.proxy https://user:pass@proxy:port
- Clone the repository you created using:
git clone https://github.com/[username]/[repo-name].git
- A folder with the [repo-name] will be created in your local machine. Copy all your project files into that folder and run:
git add .
git commit -m "Add all source files"
git push origin master
- Voila, your code is now online on GitHub!