Tools & Hosting Reviews

Git and GitHub for Beginners: Version Control Basics for Website Owners and New Developers

Version control keeps a history of every change to your website's code. Here's Git and GitHub explained simply, for owners and new developers.

In this article · 8 sections
  1. Why it matters for business owners
  2. Key concepts
  3. Basic commands
  4. A simple, safe workflow
  5. What NOT to put in Git
  6. Private vs public repositories
  7. Deploying from Git
  8. FAQs
  9. Is GitHub free?
  10. Do WordPress sites need Git?

Has a developer ever "fixed" something on your website and broken something else, with no way to undo it? Version control prevents that. Git records every change to your code, and GitHub (or GitLab/Bitbucket) stores that history online. This guide covers Git and GitHub for beginners, whether you own a website or are starting out as a developer.

Why it matters for business owners

  • Undo mistakes: roll back to yesterday's working version in minutes
  • Know what changed: every change has an author, date and description
  • No lock-in: if your developer changes, the new one gets the full code and history
  • Safer deployments: changes are tested before going live

Ask your developer: "Is our website code in a Git repository, and is the repository in our account?"

Key concepts

  • Repository (repo): the project folder plus its full history
  • Commit: a saved snapshot with a message ("Fix contact form email")
  • Branch: a separate line of work (e.g. new-design) that doesn't affect the main version until merged
  • Merge: combining a branch back into the main code
  • Remote: the online copy (on GitHub)
  • Pull request (PR): a request to merge changes, where they can be reviewed first

Basic commands

git init                      # start tracking a folder
git add .                     # stage changes
git commit -m "Add FAQ section to services page"
git branch new-design         # create a branch
git switch new-design         # move to it
git push origin main          # upload commits to GitHub
git pull                      # download latest changes
git log --oneline             # see history

A simple, safe workflow

  1. Keep main as the live, working version
  2. Make changes on a branch
  3. Test on a staging site
  4. Merge to main and deploy
  5. Tag releases (e.g. v1.4) so you can return to them

What NOT to put in Git

  • Passwords, API keys and database credentials. Use a config file that's excluded with .gitignore
  • Large uploaded files (user uploads, backups)
  • vendor/ or node_modules/ folders that can be reinstalled

If secrets were committed by mistake, change those passwords; deleting the file later doesn't remove it from history.

Private vs public repositories

Business code should be in a private repository owned by the business account. Add developers as collaborators and remove them when the work ends.

Deploying from Git

  • Many hosts (including some shared hosting panels) can pull from a Git repository
  • Automated deployment (GitHub Actions or similar) can upload changes after tests pass
  • At minimum, developers can git pull on a VPS or upload a tested release

FAQs

Is GitHub free?

GitHub offers free private repositories for individuals and small teams, with paid plans for advanced features. Check current plans.

Do WordPress sites need Git?

Custom themes and plugins benefit greatly. For the content itself (posts, pages), rely on database backups.

All custom projects at Joboo Web can be delivered with a repository in the client's own account. Ask us.

Share this article

Joboo Web

Web design, SEO & digital marketing team · Ludhiana, Punjab

Joboo Web has helped Indian businesses grow online since 2019 — building fast websites and running SEO, Google Ads and social campaigns for clients in 80+ cities. About us →

Keep reading

💬