Skip to content
RCSI USA Tech Notes

Plain-spoken notes on learning to code, desk gadgets, apps, streaming and the software that quietly runs work, home and travel.

New on

Navigate

EducationApps4 min read

Git vs GitHub: Version Control Basics for New Programmers

Git is version control software on your own computer; GitHub is an online service that hosts Git projects. What each does, key terms and a simple daily routine.

Computer, keyboard and letters

Git is a version control tool that runs on your own computer and records the history of a project. GitHub is an online service that stores copies of Git projects and adds collaboration features around them. You can use Git without GitHub at all; GitHub, on the other hand, exists to host Git projects. The confusion is understandable, since tutorials often introduce both in the same lesson.

First, what version control solves

Anyone who has saved files called essay_final, essay_final2 and essay_REALLY_final already understands the problem. Code changes constantly, and sooner or later a change breaks something that used to work. Version control keeps a precise, labelled history of every saved state of a project, so you can see what changed, when and why, and step back to an earlier version without guesswork.

It also makes collaboration possible. Several people can work on the same files, and the system helps combine their changes instead of letting one person silently overwrite another.

Git and GitHub compared

GitGitHub
What it isFree, open-source version control softwareA website and service for hosting Git repositories
Where it runsOn your own machine, usually from a terminal or editorIn the cloud, through a browser or apps
Works offline?Yes, fullyNo, it needs an internet connection
Main jobTracking changes and historySharing, backing up and reviewing work with others
ExtrasBranching and merging built inPull requests, issue tracking, project pages, automation

GitHub is not the only option. Other hosting services offer similar features, and organisations can also run their own Git server. The Git commands stay the same wherever the project is hosted.

The vocabulary in plain words

  • Repository (repo): a project folder whose history Git is tracking.
  • Commit: a saved snapshot of the project at one moment, with a short message describing the change. Unchanged files are reused rather than copied again, so frequent commits take up little space.
  • Staging area: a waiting room where you choose which changes go into the next commit.
  • Branch: a separate line of work. You might create one to try a new feature without disturbing the working version.
  • Merge: combining the changes from one branch into another.
  • Remote: a copy of the repository stored somewhere else, such as on a hosting service.
  • Clone, push and pull: download a remote repository, send your commits up to it, and bring other people's commits down.

A simple daily routine

  1. Pull the latest version if others work on the project too.
  2. Edit your files as usual in your editor.
  3. Check the status to see which files changed.
  4. Stage the changes that belong together.
  5. Commit them with a message that says what changed and why.
  6. Push to the remote so the work is backed up and visible to collaborators.

Most code editors show these steps as buttons and coloured markers in the margin, which makes the routine less intimidating than raw commands. The overview of IDEs and code editors explains where those built-in tools usually live.

Writing useful commit messages

A good message describes the change in the present tense and stays short: "Fix total when basket is empty" beats "stuff" or "changes". Small, focused commits are easier to understand, review and undo than one enormous commit at the end of the day.

Mistakes that catch beginners

  • Committing secrets. Passwords, API keys and private configuration files should never go into a repository, especially a public one. Deleting them in a later commit does not remove them from the history. Use an ignore file to keep them out from the start.
  • Tracking huge or generated files. Build output, downloaded dependencies and large media bloat a repository. They belong in the ignore list too.
  • Working for days without committing. The safety net only helps if there are snapshots to fall back on.
  • Panicking at a merge conflict. A conflict just means two changes touched the same lines. Git marks both versions in the file and asks you to choose or combine them.

Questions beginners ask

Do I need GitHub to learn Git?

No. Every core Git feature works on a single computer. Adding a hosted remote becomes useful when you want an off-site backup, a portfolio others can browse, or a team to collaborate with.

Is Git only for code?

It works best with plain-text files, which includes code, documentation, configuration and notes. Binary files such as images or office documents can be stored, but Git cannot show meaningful line-by-line differences for them.

When should a beginner start using version control?

Earlier than feels necessary, ideally once projects grow beyond a single file. It fits naturally into the milestones laid out in how long it takes to learn coding, and it becomes essential the moment you work on a site with separate front-end and back-end code.

Also in Education