Jengineer - Ponderings & Discoveries

Github: Why and how?

So you’ve heard about Github and are curious what it’s all about. Why should you use it? What is it good for? (hint: not absolutely nothing!)

femalecodertocat

If you’re a developer, you’ll come across the Github name over and over. You may be signing up for a new social media account and you’ll be asked for your Github username. Or you’ll start a new job and your team lead will ask you for your Github credentials so you can be added to the team’s page. But what if you don’t even have an account? Or better yet, not familiar with what it is used for?

So, here’s the short summary: Github is awesome because you can share your code with developers around the world. For free. Yep, you can create a repository (just another name for project/codebase) and add your code there for the world to see. If you don’t feel like showing your work off just yet, you can create a private repo (short for repository. All the cool kids use that instead.)

So when would you use this infamous Github account of yours? You can link people to your projects, share code snippets, get contributors for a project you’ve been working on and need some help with, and code versioning – it comes in so handy. In case you’re wondering what versioning is all about, Github (and any revision control system) will create different versions of your file with each change that you make to it. This prevents situations where you end up with files called “test_final.html” and “test_final2021.html” and “test_final_FINAL2.html”. As you can see, this is very useful when working on a project and you want to remember which changes you made last week compared to this week’s. This is also incredibly helpful when working in a large team with several developers.

One of my favorite things about Github is the Explore page. This section is incredibly helpful in learning about and exploring(!) other people’s projects so you can see how they work. You can be inspired to create your own work based off of theirs, add to their repo, or just see how other developers write and structure their code.

Okay, are you sold on Github yet? I hope so. Now to setup your very own Github account! Since there’s plenty of documentation already available on these next steps, I’ll just link to them here.

  1. Create a new account here.
  2. Create a new repo here.
  3. Connect to repo on your computer here.
  4. …And finally push up some sample code here!

Happy coding 🙂