๐ŸŒฑ Guide ยท for beginners

Git, explained plainly

Most guides assume you already know half of it. This one doesn't. If you've never used version control โ€” the thing that saves and tracks every version of your code โ€” start here. In clear, accessible language, one step at a time.

A RepoHunter guide ยท written by a first-time developer, for first-time developers ยท ~12 min read
What's inside
  1. Why version control
  2. What Git actually is
  3. The 4 ideas to grok
  4. Your first repository
  5. Push it to the cloud
  6. The everyday loop
  7. Branches & pull requests
  8. Cloning & reusing code
  9. Where to host it
  10. Alternatives to Git
  11. The cheat sheet
  12. Let an AI walk you through it

Why version control exists

Ever had a folder like project_final, project_final_v2, project_final_REALLY_final? That's version control done by hand โ€” badly. It loses history, breaks collaboration, and there's no "undo" when something goes wrong.

Version control fixes this. It records every meaningful change to your files as a snapshot you can name, revisit, undo, and share. You get a full timeline of your project, the ability to jump back to any point, and a safe way for multiple people (or you + an AI agent) to work on the same code without clobbering each other.

What Git actually is

Git is the tool that does version control โ€” by far the most popular one. It runs on your computer and quietly tracks your project's history. GitHub (and GitLab, Codeberg, and others) are websites that host your Git projects online so you can back them up, share them, and collaborate. Git โ‰  GitHub: Git is the engine; GitHub is one place to park it.

The 4 ideas to grok

TermClear Language
Repository (repo)Your project folder, but with a memory. Once it's a repo, Git tracks everything in it.
CommitA saved snapshot with a message ("added login page"). Like a checkpoint in a video game โ€” you can always return to it.
BranchA parallel copy where you try things without touching the main version. Break stuff safely, then merge it back when it works.
RemoteThe online copy (e.g., on GitHub). You push your commits up to it and pull others' changes down.

Your first repository

1

Install & introduce yourself

Get Git from git-scm.com (macOS/Linux often have it already; type git --version to check). Then tell it who you are โ€” this stamps your commits:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"
2

Turn a folder into a repo

# from inside your project folder
git init

That's it โ€” Git is now watching this folder.

3

Make your first commit

git add .            # stage everything (mark it to be saved)
git commit -m "First commit"   # save the snapshot with a message

You just created your first checkpoint. git status shows what's changed; git log shows your history.

โš ๏ธ Never commit secrets. API keys, passwords, .env files โ€” once committed and pushed, they live in history forever, even if you delete them later. Add a .gitignore file listing things to skip (like .env, node_modules/). When in doubt, don't commit it.

Push it to the cloud

Now back it up and share it. Create an empty repo on your host (see Where to host it), then connect and push:

git remote add origin https://github.com/you/your-repo.git
git branch -M main
git push -u origin main

Your code is now safely online. Refresh the page and you'll see it.

The everyday loop

99% of Git is these few commands, over and over:

git pull            # get the latest (if collaborating)
# ...do your work, edit files...
git add .           # stage your changes
git commit -m "what you changed"
git push            # send it up
๐Ÿ’ก Commit often, in small chunks, with clear messages. "Fixed login bug" beats "stuff." Future-you (and anyone reading) will thank you.

Branches & pull requests

When you want to try something risky โ€” or work with others โ€” make a branch:

git checkout -b my-feature   # create + switch to a new branch
# ...work, commit...
git push -u origin my-feature

Then on GitHub you open a Pull Request (PR) โ€” a proposal to merge your branch into main. Others (or you) review it, then merge. This is how nearly all collaboration and AI-assisted work happens: changes land as reviewable PRs, not surprise edits to main.

Cloning & reusing code

To grab a copy of someone's public project:

git clone https://github.com/owner/repo.git

Now you have the whole thing locally. But before you build on it โ€” check the license and credit the author (that's the whole reuse-first ethos, and there's a right way to do it). And before you adopt anything, it's worth asking: is this repo actually worth reusing, for my project? That's literally what RepoHunter is for.

Where to host it

Git is the engine; here's where to park your repos. All have a free tier.

HostBest forNote
GitHubEveryone / the defaultBiggest community, best integrations, where most open source lives.
GitLabBuilt-in CI/CD, teamsPowerful DevOps features; self-hostable.
CodebergPrivacy, non-profit ethosCommunity-run, runs on open-source Forgejo.
BitbucketAtlassian/Jira shopsTies into Jira/Trello.
Self-hosted (Gitea / Forgejo)Full control, your serverLightweight GitHub-alike you run yourself โ€” the reuse-first choice.

Alternatives to Git

Git won, but it's not the only option:

ToolWhy you'd look at it
Jujutsu (jj)A newer, friendlier front-end that works with Git repos โ€” many find it easier to reason about.
Mercurial (hg)A cleaner, simpler design than Git; used by a few big projects.
FossilAll-in-one (version control + bug tracker + wiki) in a single file. Great for solo/small.
Subversion (SVN)The older centralized model; still around in some enterprises.

For 99% of people starting today: learn Git. It's what the world uses, and everything else can wait.

The cheat sheet

git init                    # start tracking this folder
git status                  # what's changed?
git add .                   # stage all changes
git commit -m "message"     # save a snapshot
git log --oneline           # see history
git clone URL               # copy a repo
git pull                    # get latest from remote
git push                    # send your commits up
git checkout -b name        # new branch
git checkout main           # switch back to main
git merge name              # merge a branch in
git diff                    # see exact changes
git restore file            # undo unstaged changes to a file

Let an AI agent walk you through it

Stuck? Paste this into any AI coding agent (Claude, Cursor, Copilot, ChatGPT) โ€” fill in the brackets and it'll guide you step by step, safely, at your pace:

I'm new to Git and version control. Walk me through it step by step, one command at a time, and wait for me to confirm each step worked before giving me the next.

My situation:
- Operating system: [Windows / macOS / Linux]
- What I'm trying to version: [describe your project or folder]
- Do I have a GitHub account yet? [yes / no]

Please:
1. Help me install and configure Git.
2. Turn my project folder into a Git repository and make my first commit.
3. Create a remote (GitHub or an alternative) and push my code up.
4. Show me the everyday save-your-work loop.
5. Explain branches and pull requests once I'm comfortable.

Explain each command in clear, accessible language BEFORE I run it, tell me what to expect, and warn me about anything I should NOT do โ€” especially committing secrets, API keys, or passwords.
Now go reuse, don't reinvent.

You know Git. The next skill is knowing what's worth cloning in the first place โ€” RepoHunter tells you honestly, before you adopt it.

Open RepoHunter โ†’