What Is GitHub & What Is It Used For
What Is GitHub & What Is It Used For
Introduction
Here's what programmers need to know
about GitHub — how to get started with
GitHub, its benefits, and best practices.
GitHub would be
a good choice!
If you had to pick the single most important
platform for developers to know today, GitHub
would be a good choice. Although using GitHub
— which reports more than 83 million active
users as of 2022 — is not strictly required for
modern programming, GitHub (along with a
handful of similar, competing platforms) has
become the de facto hosting service that
programmers use to store and share software
they write.
What's Inside
01 03
INSIDE
How Does GitHub What Are Some of
Work? the Features of
GitHub?
02 04
GitHub vs. Git How to Get Started
with GitHub
Click here or press enter for the accessibility optimised version
GitHub is a platform for hosting software. It's GitHub provides these features by allowing
designed primarily for hosting source code, programmers to configure repositories. Typically,
meaning the "raw," uncompiled code that is used each repository is dedicated to a specific
to build applications. You can also upload, store, software project; for example, if you're building
and share binary files (such as compiled multiple applications, you'd generally create a
applications or images) on GitHub if you wish, separate repository for each of them. You can
but it's more common to use binary repositories then upload and store the various files
for this purpose; for example, if you want to store associated with each project — source code files,
and distribute container images, you could use configuration data, documentation, and so on —
Docker Hub. in the repository. Whenever you modify a file or
replace it with a new one, GitHub automatically
GitHub's core features include support for: keeps track of the version changes.
GitHub makes it easy to review both the code you write and the code
others write — as well as leave comments and suggestions.
GitHub enables you to share code with anyone who may want it.
Because GitHub is hosted on the internet, it can be accessed from anywhere. In addition, multiple
developers can work on code in the same repository at once — a feature that is beneficial for projects
where more than one coder is developing software. GitHub automatically monitors which developers
made which changes to data inside repositories, so you get a record not just of how your versions have
5 Benefits of changed over time, but also who was responsible for the changes. And you can revert changes made
by a specific developer, or changes associated with a certain version, whenever you want.
GitHub GitHub repositories can be either public (meaning that anyone on the internet can view and download
code hosted in them) or private (which means they are available only to specific users). Public GitHub
repositories are a great way to host open source code, while private repositories are useful if you want
to build software that should be available only to developers inside your organization or a select group
of external users.
Click here or press enter for the accessibility optimised version
of the Features others prefer a fully tested, stable version. associated with them — that are of interest to
them. Developers can also configure GitHub
Collaboration and social
of GitHub? networking for developers
profile pages to share information about
themselves. And, although you can't send
Although it would be a stretch to call GitHub a messages directly through GitHub, it's a
We touched on GitHub's core code hosting, social media platform in the traditional sense of common practice for coders to share their
sharing, and collaboration features above, but the term, it offers collaboration features that help contact information on their GitHub pages so
let's take a deeper look at how GitHub's features developers network with each other. that others can contact them if they wish.
work.
Create an account. Join GitHub by configuring Create a repository. With an account set up, Make a pull request. If you want the authors
a username and password. you can set up your first repository by clicking of a repository to integrate changes you've
Choose a plan. You can set up an account the + button in the upper-right corner of the made to their code inside a forked repository,
with basic features and quotas for free, GitHub interface and selecting New project. you can submit a pull request by clicking the
although GitHub paid plans are available if you Fork a repository. A repository fork is a copy Pull request button.
want enhancements like added storage. of an existing repository. If you want to work Watch a repository. To get updates whenever
on someone else's code (or code that you host a repository changes, you can "watch" it by
in one of your own repositories) without setting up a repository subscription.
changing the original code, you can create a
fork. To fork a repo, click the Fork button on
the repository you want to copy.
Resources for Learning More About GitHub
Unsurprisingly given that GitHub is a widely used If you run into trouble using GitHub, start resources available from YouTube and other
platform, there are a variety of resources you can troubleshooting on the GitHub help site, which is third-party sites, although they vary in quality. For
leverage to learn more about it. designed to help users resolve challenges. If that the most reliable content, stick with well-known,
fails, you can ask a question in the GitHub official sources — like GitHub's own YouTube
One of the most important is the GitHub blog, community forum. channel.
where you'll find announcements about the latest
GitHub feature releases and changes, as well as To dive deeper into GitHub's features and
guidance and perspective on getting the most become an advanced user, you can take courses
out of GitHub. on GitHub Learning Lab. There are also, of
course, a large number of free guides and
resources available from YouTube and other
Best Practices 1
Create a repository for each project:
Although it may be simplest to create 2
Test before making pull requests:
Before you submit a pull request,
Most Out of has its own repository. will accept your request.
GitHub 3
Use descriptive commit messages:
Whenever you make a change to code 4
Don't use GitHub as a backup
service: Although you technically
in GitHub, include a comment could store data that you want to back
You should check out the explaining why you did it. Other developers — not up using GitHub, that's not what GitHub is
resources described above for full to mention your future self — may want to designed for. It's also not especially cost-
details on GitHub best practices. understand your thinking. effective for large-scale data backup storage.
But if you're new to GitHub, some Use a dedicated backup storage platform if you
basic best practices to keep in Don't use GitHub to host binaries: need to back up information.
mind include: 5 Likewise, GitHub is not intended to be
a place to host application binaries.
Store those in a binary repository or container
registry, and use GitHub for your source code.
About the author
GitHub
source software, virtualization, containers
and more. He also lectures at a major
university in the Albany, New York, area.
His book, “For Fun and Profit: A History of
GitHub is not the only platform of its kind, but it is one of the most popular the Free and Open Source Software
solutions today for hosting source code. It's easy to use, it supports both public Revolution,” was published by MIT Press.
and private repositories, and it's free of cost for most projects that operate on a
small scale. If you're looking for a way to host your code and collaborate with
other developers, GitHub is an excellent place to start.
Click here or press enter for the accessibility optimised version
Want More?