Years ago when I first started coding, I managed my projects by saving all my files in cluttered folders on my desktop. I would end up with backups named “project1_ver2”, “project1_ver3”, and so on. Things got messy quickly. I heard other coders talking about how Github changed their life, but I didn’t understand what it was or why I would need it. That changed when I worked on my first big coding project. After staying up for hours trying to debug a complex issue, I finally got my code working. I went to bed exhausted but satisfied. The next morning, I opened up my files only to find the bug was back. None of my changes from last night were saved! I must have forgotten to save before shutting down. I was so frustrated I wanted to cry. There had to be a better way to manage my code and there is – it’s called Github. Now, Github is an essential part of my coding workflow. It helps me version control my code, collaborate with others, and share what I build. It can be very intimidating for newbies so I decided to write this article to demystify it.
At its core, Github hosts remote repositories to store your code projects in the cloud. You don’t have to rely on your local machine. It utilizes Git to track every change you make to your code. This means you can review, restore, and revert to any previous version with ease. No more losing work! With Github, I initialize a git repository locally on my computer. This links my project folder to a remote repo on Github. As I work, I make commits which are snapshots of my codebase. I push these commits to sync them to the remote repository on Github. Now my projects have built-in backup and version control. I can experiment, knowing I can undo anything I don’t like. I can view previous versions of a file or the entire project. And with the code stored remotely, I don’t have to worry about hardware failure or losing my laptop.
But wait, it gets better! Github helps me collaborate with others in amazing ways:
- I can add collaborators to my repositories and code together on shared projects. We each work on tasks, make commits, and merge our work.
- I can contribute to open source projects by forking a repository, making changes, and submitting a pull request to the owner. My code contributions get peer reviewed before being merged.
- I can use Github Pages to easily host websites for my projects to share them.
- can reference code examples from millions of public repositories to improve my skills.
Github keeps me organized too. I can use GitHub issues to track bugs and feature requests. I can create wikis for documentation. I can review my project planning on Kanban boards. With hundreds of integrations, the possibilities are endless. As a new coder, learning Github may feel daunting at first. But once you experience the immediate benefits, you’ll wonder how you ever coded without it. The time savings from version control and collaboration alone make it worth learning. Follow the excellent Github guides to get started. Look for projects on Github to contribute to. Use it to showcase your work. Before you know it, you’ll be hooked. Github supercharged my coding journey. I can’t wait for it to help launch your coding career too!