How GitHub works

If you do anything even remotely related to computer science, you probably know about GitHub. GitHub is a fantastic platform where you can contribute to open-source code, as well as host any personal or collaborative programming projects. This guide is mainly for people who haven't heard a lot about GitHub, but are interested in getting started with it.

GitHub is kind of like an online file storage system where you can upload your code and share it with others, except with many more perks. For one, it uses Git, a version control system that tracks the changes in your code made every time you "commit" your files (which is basically like uploading your files to GitHub).

Git allows you to work on multiple versions of the same code at the same time. For instance, if you and your teammate are working on the same code file, Git is able to merge your code with theirs, ensuring that both your and your teammate’s changes are preserved. Git also allows you to keep different versions of your code project in the form of branches. For example, if you have an already-working version of your program that is being used, you can put that in a "production" branch, and your new version of the program with new features (and probably new bugs) can go into a "development" branch so that any new bugs don't affect the already-working versions. For these reasons, many professional developers use Git, so GitHub can be a great way to learn a technology that many companies use (and that can get you hired in interviews!).

There are other platforms similar to GitHub that use Git as well, like BitBucket, but while BitBucket is better for professional teams, GitHub is better for individuals who want to contribute to open-source projects every so often but have other work outside of their GitHub projects.

Open-source projects are projects in which all the code is made freely available. While a lot of open-source projects are small side hustles made for fun by various developers, there are many large projects that are open source as well. For example, projects like Microsoft Visual Studio Code, dogecoin, and Facebook React.js can all be found on GitHub, and anyone with a GitHub account can contribute and propose changes to improve them. Some of the ways you can contribute are to submit an issue that you've found in the code, or, if you think you can fix an issue, you can submit a pull request with the code that you have fixed.

In addition, GitHub has features that are good for personal portfolios that you can use in professional interviews and applications. For one, all the repositories (where all the code and branches of your project is stored) show up automatically on your user profile, as well as a diagram of the number of commits you've made over the past year, both of which are very useful for potential employers.

GitHub also comes with a free website hosting service called GitHub Pages. If you know your way around HTML, CSS, JavaScript, and other web development technologies, you can easily convert a GitHub repository into a working website. If not, GitHub Pages is also integrated with Jekyll, software that generates pre-built websites in a GitHub repository that you can easily modify to your liking.

Many recommend dipping your toe into GitHub earlier rather than later, as it is pretty easy to get started, but can help you immensely for the future. Not only can you build personal portfolios, but you can also contribute to other open-source projects and show that you are ready for a professional career in computer science.