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.
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.
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.
| Term | Clear Language |
|---|---|
| Repository (repo) | Your project folder, but with a memory. Once it's a repo, Git tracks everything in it. |
| Commit | A saved snapshot with a message ("added login page"). Like a checkpoint in a video game โ you can always return to it. |
| Branch | A parallel copy where you try things without touching the main version. Break stuff safely, then merge it back when it works. |
| Remote | The online copy (e.g., on GitHub). You push your commits up to it and pull others' changes down. |
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]"# from inside your project folder
git init
That's it โ Git is now watching this folder.
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.
.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.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.
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
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.
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.
Git is the engine; here's where to park your repos. All have a free tier.
| Host | Best for | Note |
|---|---|---|
| GitHub | Everyone / the default | Biggest community, best integrations, where most open source lives. |
| GitLab | Built-in CI/CD, teams | Powerful DevOps features; self-hostable. |
| Codeberg | Privacy, non-profit ethos | Community-run, runs on open-source Forgejo. |
| Bitbucket | Atlassian/Jira shops | Ties into Jira/Trello. |
| Self-hosted (Gitea / Forgejo) | Full control, your server | Lightweight GitHub-alike you run yourself โ the reuse-first choice. |
Git won, but it's not the only option:
| Tool | Why 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. |
| Fossil | All-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.
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
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.
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 โ