What is GitHub for a beginner and how to get started with it?

When you were a child you had many toys. You kept them in your room in a decorated fashion and played with them on a regular basis. Sometimes you wanted to flaunt them in front of your friends and classmates and show them by inviting to your room. Some time you had one toy let’s say a red model of car. Still you would go out in the market and purchase a blue one and stack it up with your other toys. Sometimes you allowed some of your friends to come over and play with it but didn’t let them to take it away and sometimes you would go to meet them up. That’s it, these are enough to get you through the concepts of GitHub!

I know GitHub looks so complicated. The jargon they use like push, pull, stash, commit, remote, master etc does nothing to help understand what it’s about.

Consider Projects analogous to toys and your GitHub Account as your room:

You kept toys in your room in a decorated fashion and played with them on a regular basis, GitHub is a place where you can keep your projects. You can work on them, track them, update them regularly as per your wish.

Sometimes you would want to flaunt them, GitHub is a best place to keep your projects and showcase them to the world. Even if you have a single project you can put it up on GitHub for world to see. This not only showcases your skills but also creates a new possibility where you could receive positive remarks and comments from contributor’s worldwide and thus getting exposure that would not have been possible if your project was present on your machine.

Sometime you had one toy let’s say a red model of car. Still you would go out in the market and purchase a blue one and stack it up with your other toys, GitHub allows you to keep different versions of the same project. That’s why it’s said to be “version control tool”. By this I mean that you can have a project with extended feature A and same project with another extended feature B. You don’t need to write two different pieces of code and put them separately. You can beautifully place your entire code in the same place and use Git as version control working on two different features simultaneously.

Sometime you allowed some of your friends to come over and play with it, and sometimes you would go at theirs — GitHub gives you an opportunity to contribute in any projects worldwide. Open source community is rich and full of talented people who would love to contribute in projects of their interest. You could choose a project and contribute in it or you could invite any community to contribute in any of yours. GitHub makes it very simple.

Here are three steps to get you started with your own projects:

1. Identify a simple problem you could solve:

A project needs to be based on an idea or a solution. Look around and identify a problem that really needs fixing. This doesn’t have to be completely unique or else you will spend a whole month cracking your head for a unique solution and not find it still. You could even identify an app that you already see in use somewhere and decide to recreate it, group up, for your learning purposes. Again the programming language can be any of your choice. You are not limited. You could choose to build your app in a language that you are already good at or you could choose a completely new programming language and use this as an opportunity to learn the language too. Don’t punch yourself in the face if you can’t settle on an app. You could alternatively decide to build plugin, or a library or a simple To-Do app if you are out of ideas

2. Write the code and push to GitHub from day one:

Create a public repository on GitHub and fill the Readme.md file first with what your project is about. It will also act as a reminder to you as you code your way to success. There is also documentation on Github that you could find useful with basic commands. You will need to get accustomed to commands for creating branches, knowing the master, push, pull, merge, rollback and stuff. Have a written plan for your project so that it acts as a clear road-map. That’s key to contributing to open source projects because nobody is watching you. It’s up to you to know what you are doing, if you care about your time and energy.

3. Test, Deploy, Fix bugs, Invite friends:

It’s time to test your plugin or application that you have been brooding over for weeks! You could do functional tests or write automated unit tests. You can write simple unit tests to accompany your code: it shows you are serious about what you are doing.

Get users, Announce it in the streets. Your new app, could be a web app. Nobody will crash by your repository and magically discover it. But you don’t have sweat your pants chasing for a big audience. Just a few who can test it/use it, and give you feedback.

Your users will help you to identify bugs and you in turn fix them. Ask other to contribute some code. It might be hard at the start, but possible. So there you go with a full-blown open source project.

After you already have your project out, you’ll find more fun by joining other projects. Otherwise your GitHub account will be a dark lonely place without activity from other users.

At this point seek to contribute to other people’s projects. You’ll really find it much rewarding as you’ll learn greater features of GitHub and network at them same.

Article by Varun Srivastava

A Community of technophile students!