Welcome! This repository is a shared notebook about Git and GitHub, and also the place where you'll practice using them.
The idea is simple: you learn Git by reading the notes, and you learn GitHub by forking this repo, creating your own branch, adding a file about yourself, and sending a Pull Request. By the time your first PR is merged, you've already used almost everything described in these files.
.
├── README.md ← You are here: what this repo is and how to set it up
├── notes/
│ ├── git.md ← Everything about Git: concepts, commands, workflow, misconceptions
│ └── github.md ← Everything about GitHub: repos, forks, PRs, issues, misconceptions
└── students/
├── _TEMPLATE.md ← Template for your introduction (don't edit this one)
└── <your-name>.md ← Your own introduction file goes here
This repo intentionally contains only text / Markdown files. No code, no build steps, nothing to install except Git itself.
- Students who have never used Git before
- People who've used Git a little but get confused by branches, staging, or merge conflicts
- Anyone who wants a clean, beginner-friendly reference they can keep and extend
Every student does the same first task:
- Create a branch with your name
- Add a file with your name inside the
students/folder, introducing yourself - Open a Pull Request
The steps below walk you through it.
Use the same name for your branch and your file: all lowercase, words joined with hyphens, no spaces or special characters.
| Your name | Branch name | File name |
|---|---|---|
| Priya Sharma | priya-sharma |
students/priya-sharma.md |
| Rahul Verma | rahul-verma |
students/rahul-verma.md |
| Ana Lucía Gómez | ana-lucia-gomez |
students/ana-lucia-gomez.md |
💡 If two students have the same name, add something extra, like
rahul-verma-2or your GitHub username.
| OS | How |
|---|---|
| Windows | Download from git-scm.com and run the installer (defaults are fine). This also installs Git Bash. |
| macOS | Run git --version in Terminal. If it's missing, macOS will offer to install it. Or use brew install git. |
| Linux | sudo apt install git (Debian/Ubuntu) or sudo dnf install git (Fedora) |
Check that it worked:
git --versionTell Git who you are. This name and email get attached to every commit you make.
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main💡 Use the same email you use on GitHub so your commits are linked to your profile.
Verify:
git config --list- Go to github.com and sign up.
- Verify your email.
- (Recommended) Turn on two-factor authentication in Settings → Password and authentication.
A fork is your own personal copy of this repo, under your GitHub account.
- Click the Fork button at the top-right of this page.
- Keep the default settings and click Create fork.
- You'll now be on
github.com/<your-username>/<this-repo-name>.
On your fork's page, click the green Code button and copy the HTTPS URL. Then:
git clone https://github.com/<your-username>/<this-repo-name>.git
cd <this-repo-name>Connect your copy to the original repo so you can pull future updates:
git remote add upstream https://github.com/<original-owner>/<this-repo-name>.git
git remote -vYou should see two remotes:
origin→ your forkupstream→ the original repo
Never work directly on main. Create a branch named after you (see the naming rule above):
git switch -c <your-name>Example:
git switch -c priya-sharma(Older equivalent: git checkout -b priya-sharma)
Check you're on the right branch:
git branchThe branch with a * next to it is the one you're on.
Copy the template into a new file with your name, inside the students/ folder:
cp students/_TEMPLATE.md students/<your-name>.mdExample:
cp students/_TEMPLATE.md students/priya-sharma.md🪟 On Windows Command Prompt (not Git Bash), use
copy students\_TEMPLATE.md students\priya-sharma.mdinstead. Or just create the file in your editor and paste the template in.
Now open your file in any text editor (VS Code, Notepad, etc.) and:
- Delete the "How to Use This Template" section at the top.
- Fill in your name, where you're from, your ambition, skills, hobbies, and the rest.
- Save the file.
⚠️ Only edit your own file. Don't change_TEMPLATE.mdor anyone else's file.🔐 Privacy: This repo may be public. Don't include your phone number, home address, personal email, or date of birth.
git status # you should see your new file in red
git add students/<your-name>.md # stage your file
git status # now it should be green
git commit -m "Add introduction for <your-name>"
git push -u origin <your-name> # upload your branch to YOUR forkExample:
git add students/priya-sharma.md
git commit -m "Add introduction for priya-sharma"
git push -u origin priya-sharma- Go to your fork on GitHub. You'll see a banner: "Compare & pull request". Click it.
- Make sure the PR goes from
your-username/<your-name>intooriginal-owner/main. - Title it:
Add introduction for <your-name> - Click Create pull request.
A maintainer will review it, maybe leave comments, and merge it. 🎉 That's your first open-source contribution!
🛠️ Need to fix something after opening the PR? Just edit your file, then
git add,git commit, andgit pushagain on the same branch. The PR updates automatically.
Once your introduction is merged, you can contribute notes to notes/git.md or notes/github.md:
- A concept explained in your own words
- A command that confused you and how you figured it out
- A misconception you had
- A mistake you made and how you fixed it
For each new contribution, sync your fork first (see below), then create a new branch with a descriptive name:
git switch main
git pull upstream main
git switch -c <your-name>-git-stash-notesThen add, commit, push, and open a PR the same way as before.
Other students' files and notes will get merged over time. To get them into your fork:
git switch main
git pull upstream main
git push origin mainOr click Sync fork on your fork's GitHub page, then run git pull locally.
To keep the repo clean and useful for everyone:
- Follow the naming rule. Branch and file both use your name in lowercase-with-hyphens.
- Your introduction goes only in
students/<your-name>.md. Never edit someone else's file or the template. - Notes go in the right file. Git concepts →
notes/git.md. GitHub features →notes/github.md. - Put notes under the right heading. If no heading fits, create a new one.
- Don't delete other people's notes. Improve or clarify them instead.
- Keep it beginner-friendly. Explain jargon the first time you use it.
- Test your commands. If you add a command, make sure it actually works.
- One topic per PR. Small PRs are easier to review and less likely to conflict.
- Write a meaningful commit message.
"Add explanation of git rebase"✅ —"update"❌ - Never commit to
main. Always use a branch.
- Run
git status. It almost always tells you what's going on and what to do next. - Committed on
mainby mistake? Rungit switch -c <your-name>to move your work onto a new branch, then push that branch. - Push rejected or asking for a password? GitHub needs a Personal Access Token or SSH key, not your account password. See section 9 of
notes/github.md. - Open an Issue in this repo describing your problem.
- Check the "Common Mistakes" sections in
notes/git.mdandnotes/github.md.
Code. Commit. Contribute. Repeat.
The more you use Git & GitHub, the more confident you'll become.
Happy learning! 🚀