0% found this document useful (0 votes)
52 views

What Is GitHub & What Is It Used For

GitHub is a platform primarily used for hosting source code that allows developers to collaborate easily. It provides version control which tracks changes to code over time. Developers can configure repositories for specific projects to store and share code, and GitHub automatically monitors which developers make changes. Multiple developers can work on a project simultaneously in the same repository.

Uploaded by

Dimitar Marinkov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

What Is GitHub & What Is It Used For

GitHub is a platform primarily used for hosting source code that allows developers to collaborate easily. It provides version control which tracks changes to code over time. Developers can configure repositories for specific projects to store and share code, and GitHub automatically monitors which developers make changes. Multiple developers can work on a project simultaneously in the same repository.

Uploaded by

Dimitar Marinkov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Click here or press enter for the accessibility optimised version

What Is GitHub and


What Is It Used For?
Click here or press enter for the accessibility optimised version

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.

This article breaks down everything modern


coders need to know about GitHub — including
how it works, what its benefits are, and how to
use GitHub as a version control and source code
management solution.
Click here or press enter for the accessibility optimised version

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

How Does GitHub


Work?
How Does GitHub Work?
Related: GitHub Updates Improve Code Security, Developer Productivity

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.

Storing source code


Tracking changes to source code over time
Sharing code with other developers or end
users, if desired
GitHub enables developers to share code and collaborate easily with
other developers when building software.

GitHub automatically tracks version changes to code.

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.

Developers can use GitHub to manage documentation files

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

GitHub vs. Git


GitHub vs. Git
Most of GitHub's core collaboration and version
control features derive from Git. Git is an open
source version control system created by Linus
Torvalds (the developer who introduced the Linux
kernel) to help programmers manage source
code. However, whereas Git is a tool that works
only from the command line, GitHub provides a
web interface for interacting with Git
repositories.

GitHub also provides a variety of additional


features — such as Issues, which helps
developers track their work, and Copilot, which
can automatically generate code using AI —
that are not part of Git
GitHub Competitors and
Alternatives
GitHub is not the only web-based, Git-centered You can also set up your own GitHub-like
code hosting solution. Alternative services, such environment by deploying a Git server and
as GitLab and Bitbucket, provide approximately installing a web front end, like GitWeb, to interact
the same functionality. The main differences with it. This requires more effort than using
between these services and GitHub lie in which GitHub, where the underlying infrastructure is
add-on features they provide beyond core Git provided for you and you can launch repositories
functionality. with just a few clicks. But setting up your own Git
server provides more control because you fully
Public clouds also offer services that are similar own the host infrastructure, and you can
in some ways to Git — for example, Azure configure the software in any way you want.
Pipelines lets developers manage and deploy
source code, among other features. However,
because these services aren't designed to make
it easy to share code with the public at large, it
makes more sense to use them when developing
proprietary software, rather than code that you
want to be publicly accessible.
What Are the Benefits of Using
GitHub?
There are many reasons to take advantage of GitHub:
Social coding: GitHub is sometimes called a Code sharing: By configuring public
social coding platform because it lets repositories, you can use GitHub to share code
developers collaborate easily when building with anyone who may want it.
software. Even if you don't specifically need to Documentation: Although GitHub isn't a
collaborate with other coders, sharing your complete documentation tool on its own,
code on GitHub allows other developers to developers can use it to manage
inspect, download, and (if you give them documentation files in addition to code.
permission) even modify your code, if they
wish.
Version control: As noted above, GitHub
automatically tracks versioning changes to
code.
Code review: GitHub makes it easy to review
your own code, as well as code written by
others. You can leave comments to explain
why you made a certain change, for instance,
or suggest a way to improve code.
Click here or press enter for the accessibility optimised version

What Are Some of the


Features of GitHub?
What Are Some is useful if, for instance, some of your users want
to run the "beta" version of your application while
Developers can, for instance, search through
GitHub to find projects — and the programmers

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.

GitHub for version control


Version control is a standard GitHub feature that
is enabled by default, for free. Using version
control, you can view changes to code over time.
Each change (or set of changes) is known as a
commit, and you can track how your code
evolves as various developers make commits.

Beyond being able to see how your code has


changed, you can use GitHub version control to
revert to an earlier version of your code if you
introduce a change that causes a bug, for
example. You can also make multiple versions of
your software available at the same time, which
is useful if, for instance, some of your users want
In these ways, GitHub can help boost developer Distributing code
productivity and satisfaction by helping coders GitHub is a great solution not only for making
work together based on shared interests. code available to end users, but also for
developers who want to share their code with
Web-based version control other developers in order to invite their feedback
GitHub provides a convenient way of managing or ask them to collaborate.
code through a web interface.
GitHub is particularly useful for managing open
As noted above, most of GitHub's core source projects, since open source coders are
functionality derives from Git. Functionally typically eager for the community at large to build
speaking, most of the things you can do in and use their code — and for outsiders to contribute
GitHub could also be done using Git on a to their projects, if they have the inclination.
command line.
That said, GitHub isn't strictly just for open source
However, it can be challenging to use Git on the projects. You can also set up private repositories
command line when you have dozens of if you want to manage proprietary code in GitHub.
repositories to manage and multiple developers
working across them. By allowing developers to Note, too, that although GitHub is widely used for
view the contents of repositories, open up hosting open source projects, most of the code
individual files, track changes, and much more behind GitHub itself is not actually open source.
directly through a web browser, GitHub provides For that reason, developers who are ideologically
convenience. It also makes version control more committed to open source software — who, in
scalable. other words, believe that software should be
open source as a matter of principle — may
prefer to use a GitHub alternative that is fully
open source, like GitLab.
How to Get
the Most Out
Create a repository for each Test your code before
of GitHub project submitting pull requests

Use descriptive commit Don't use GitHub as a backup


messages when making a service
change to code in GitHub

Don't use GitHub to host


application binaries; use GitHub
for your source code
Click here or press enter for the accessibility optimised version

How to Get Started with


GitHub
How to Get Started with GitHub
The process for getting started with GitHub is simple. Here are the basic steps:

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,

for Getting the one repository for all of your code,


projects are much more manageable if each one
carefully vet your code to increase the
chances that the developers you're submitting to

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

Why Start with


Christopher Tozzi is a technology analyst
with subject matter expertise in cloud
computing, application development, open

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?

ITPro Today is your


home for news and
resources on IT
operations and
management.
www.itprotoday.com/

Cookies Terms Privacy POWERED BY

You might also like