GitHub: Not Only For Developers & Why You Should Use It

GitHub is a service for hosting Git repositories. Programming teams use GitHub for collaborative software development and hosting their codebases. But, GitHub is also a decent choice for hosting other kinds of text content such as technical documentation and DevOps work. As long as any set of files can be put under version control with Git, you can host them on GitHub.

Github is the world’s largest open-source repository and was recently acquired by Microsoft. As most acquisitions follow, so has the controversy catapulting Microsoft to accept the open-source mantra as it wants to adapt new developers to its cloud services.

GitHub and Git

The primary service of GitHub is built around Git.

Git is open-source software, initially created as a version control system for software projects. But, the use of Git is now not limited to software development. Git is a popular choice for version controlling of various text-based document collections. A few examples are configuration files of web servers, technical documentation, and template files like Kubernetes Deployments.

In the early days of GitHub, it was also mainly used for hosting software codebases that used Git for version control. But, with the adaptation of Git for other document collections as mentioned above, the user base of GitHub has expanded beyond software developers.

GitHub for programmers

The original purpose of Git and GitHub was managing software projects where multiple programmers worked on the same codebase. If you are a programmer, you would already be using GitHub for this. In such a project, one programmer could fix a bug while another is adding a new feature. Using the branching feature in Git, these programmers can independently work on their parts of the code and later merge the changes to the main branch. This process ensures that the changes to the code base are added in incremental steps. Testing and quality assurance can be performed at each stage, and if a bug is found, it can be promptly resolved.

GitHub for non-programmers

The use case of GitHub for programmers is well understood. But, even if you are not a programmer, you could still benefit from it. Let’s examine two such non-programming use cases of GitHub.

DevOps

DevOps is an essential aspect of the software life cycle. Today’s software does not run on just one single platform. Multiple private and public cloud services are utilized for deploying software. To effectively manage such deployments, DevOps must work with complex configurations and dependencies.

DevOps engineers use many software tools for managing these complexities. Most of these tools rely on modeling the software architecture using YAML or equivalent markup languages. The use of these models has also created the concept of infrastructure-as-code, where the infrastructure running the software is defined in a collection of YAML templates.

Kubernetes Deployment, Helm Charts, TOSCA templates, OpenStack Heat templates, Terraform templates, AWS CloudFormation templates are examples of such application modeling techniques. The infrastructure managed by these models could be virtual machines, containers, Kubernetes clusters, storage, virtual networks, and even databases.

Complex software projects tend to have such model definitions in an extensive collection of template files. As a project evolves, DevOps engineers must keep on updating these model definitions according to the changing needs of the software.

GitHub is the perfect place to host such collections of files. In addition to the version controlling features, the collaboration toolset available in GitHub could benefit a team of DevOps working in an agile software project.

Technical Writers

 A team of technical writers working on the same project in collaboration with each other works closely with an agile team of software developers. Such writers also can use GitHub in much the same way as developers do.

GitHub has implemented a text formatting syntax which is an improved version of Markdown. It’s called GitHub flavored Markdown, which writers can use to create nicely formatted documents.

Benefits of GitHub

Although it’s based on Git, GitHub does not limit its service offering to version control. GitHub offers many other features that are beneficial for both programmers and non-programmers alike.

Version Control

 This is the fundamental feature of Git and GitHub. Version control is crucial for any software project. Also, for many technical writings and DevOps work, version control is essential.

Version control helps keep track of the changes we make and gives us the ability to switch back to a previous version. Combined with the branching feature of Git, the version control allows a team of developers to work on the same repository simultaneously.

Even if you are a solo developer, version control and branching in GitHub are beneficial features. GitHub can also be a backup for your code. Since GitHub is accessible from anywhere, you can continue working on your repository from multiple computers without the hassle of copying files from one computer to another.

Team Collaboration

Communication and collaboration among the team members is a principal factor for success in any project. With the increased preference for remote working, it’s essential to have the proper toolset to support collaborative work for the developers, DevOps, and the technical writers working on a software project.

GitHub pull requests are the primary feature for collaboration among people working on the same repository. A pull request allows anyone to make changes to a repository and request the repository owner to merge the changes to the main branch.

When you create a pull request, you can include the details of the changes you have made. Then the other contributors can review the changes and comment on them so that you can effectively establish a communication channel with everyone interested in the changes proposed in the pull request. Others can also add further updates to the pull request. After everyone is satisfied with the changes, the repository owner can merge the pull request to the repository’s main branch.

Issue Tracking

 Most notable open-source projects are using GitHub for hosting their codebases. These projects have lots of individuals contributing code. Modern enterprises also have large development teams working on software projects where the requirements are rapidly changing. All such projects require a comprehensive issue-tracking system.

GitHub Issues is the solution from GitHub for issue tracking. A contributor can create an issue to track bugs or enhancements. After creating an issue, the maintainers can assign it to a particular user. It is also possible to link a pull request with an issue. You can create a task list for an issue to track the action items related to the issue. After the issue is resolved, its status can be updated as “Closed,” so it does not need to be tracked any longer.

CI/CD Pipeline

GitHub initially started as a version control system for software repositories. But, later, many features have been added on top of it. One such feature is GitHub Actions. It can be used to implement a robust CI/CD pipeline.

CI/CD is a concept where developers update the code, test, and deploy continuously in rapid succession. There are purpose-built tools to support and automate this process. But, if you are hosting your code on GitHub, using the built-in GitHub Actions makes more sense than going for a third-party tool.

GitHub Actions is not strictly dedicated to CI/CD. It is a system that allows you to automate a wide variety of tasks associated with a repository. GitHub Actions are event-driven. There is an exhaustive set of events, such as push, pull request, issue open, issue closed, etc., associated with a repository. GitHub Actions allows you to define a series of actions to be executed when any desired event is triggered.

GitHub Actions also provide predefined workflows for popular CI/CD configurations. As an example, GitHub has a predefined workflow for deploying a Node.js project to Azure Web App Service. Even if your desired CI/CD configuration is not predefined, you can implement any customized CI/CD pipeline with GitHub Actions.

Code Scanning

GitHub provides a code scanning service complimentary for all public repositories. For private repositories, it’s a paid service. GitHub code scanning can uncover security vulnerabilities and coding errors. GitHub alerts you on these so you can take appropriate actions.

GitHub Code Scanning can interwork with GitHub Actions so that you can create a comprehensive Ci/CD pipeline with integrated security.

Code Documentation

All software requires documentation. When using GitHub for a software project, you can also host the documentation in GitHub for simple accessibility for the users.

GitHub provides two ways to document a project; README file and GitHub wiki.

A README file is a GitHub flavored Markdown formatted file that you place at the root of your project. This can serve as the introductory documentation, as any user will be presented with this whenever they visit your repository in GitHub.

GitHub also provides a separate wiki for every repository. Wiki is good for creating detailed multi-page documentation. With GitHub flavored Markdown in the wiki, you can include page links, syntax highlighting, etc., and create well-structured documentation for your project.

GitHub Pages – an added value

Anyone with a GitHub profile can use GitHub pages to host a static website for free. This can be created with plain HTML, CSS, or with one of the popular static site generators such as Jekyll, Next.js, Hugo, etc. GitHub pages an excellent reason to make a GitHub profile if you have not created one already.

Conclusion

GitHub is a great platform for hosting Git repositories. Programmers, technical writers, DevOps, etc., will benefit equally from using GitHub for their work.

A GitHub profile can also act as a personal portfolio to showcase your work. As an added benefit of having a GitHub profile, you can use GitHub pages to host your personal website as well.

And as for the future of Github and how Microsoft has handled the open-source platform, I find it fitting to quote a developer by the Reddit handle MarcCBD, “They are actually doing a damn good job on the open-source community and are one of the top contributors.”

en_USEN