Welcome! 👋
This repository exists as a sandbox for learning Git and GitHub.
Nothing here is “production code” — the goal is to practice workflows, make mistakes, and understand how version control works.
If you’re new to Git or GitHub, you’re in the right place.
Git is a version control system.
It helps you:
- Track changes to files over time
- Go back to previous versions
- Work on multiple features at once
- Collaborate with other people without overwriting each other’s work
Think of Git as a time machine for your code.
GitHub is a website that hosts Git repositories.
Git:
- Runs on your computer
- Tracks file history locally
GitHub:
- Stores repositories online
- Makes collaboration easy
- Adds tools like pull requests, issues, and code reviews
👉 You can use Git without GitHub, but GitHub makes teamwork (and sharing) much easier.
A repository is a folder tracked by Git.
It contains:
- Your files
- A hidden
.git/directory with all the history
A commit is a snapshot of your files at a point in time.
- Each commit has a message describing what changed
- Commits form a history you can move backward and forward through
Good commit messages are small and descriptive.
A branch is a parallel version of the code.
main(ormaster) is usually the default branch- Branches let you experiment without breaking main
- You can merge a branch back when it’s ready
A remote is a copy of your repository stored somewhere else (like GitHub).
originis the default name for the GitHub remote- You push commits to the remote
- You pull changes from the remote
git statusshows
- which files have changed
- whats staged
- whats untracked
git commit -m "Describe what you changed"Creates a snapshot of staged files.
git logShows commit history.
git diffgit branch new-branch
git checkout new-branchOr in one step:
git checkout -b new-branchgit checkout branch-nameor
git switch branch-nameFormally the command is
git push origin branch-nameor mostly in shorthand
git pushgit pull-
Make changes to files
-
Check what changed:
git status- Stage changes:
git add .- Commit changes:
git commit -m "Short description of changes"- Push to GitHub:
git push- Repeat often — small commits are better than big ones.
A pull request is a request to merge one branch into another.
Used to:
-
Review code
-
Discuss changes
-
Run automated checks
Even for solo work, PRs are a great habit.
Issues are used to:
-
Track bugs
-
Propose ideas
-
Write TODOs
Think of them as a shared task list.
A fork is a copy of someone else’s repository under your account.
Used when:
-
You don’t have write access
-
You want to experiment freely
Making Mistakes Is Normal
Everyone HAS and WILL:
-
Commits the wrong file
-
Writes bad commit messages
-
Breaks something
That’s how you learn Git. This repo is intentionally safe for experimentation.
Practice Git commands
Learn GitHub workflows
Understand commits, branches, and remotes
Get comfortable fixing mistakes
If you’re confused at any point — that means you’re learning 🙂
For help on the command line you can always type:
git help <command>