GitHub — From Zero to Collaborating

GitHub is where the world's code lives. It hosts Git repositories, powers team collaboration, automates deployments, and is the de facto portfolio for every developer.

Learning mode:

GitHub vs Git

Git is the version control software that runs on your computer. GitHub is a website that hosts Git repositories online — it adds a visual interface, collaboration tools, issue tracking, and deployment features on top of Git.

You can use Git without GitHub. But for almost every real project, you'll use both.

Creating Your First Repository

  1. 1Sign up at github.com and verify your email.
  2. 2Click the + icon in the top right → New repository.
  3. 3Give it a name (e.g. my-first-website), add a description, and choose Public.
  4. 4Check "Add a README file" and click Create repository.
  5. 5Copy the HTTPS URL from the green Code button, then run git clone <url> on your computer.

Pushing Your First Code

Shell — First push
git clone https://github.com/yourusername/my-first-website.git cd my-first-website # Make some changes... git add . git commit -m "Add homepage" git push

After pushing, refresh your GitHub repository page — your files will appear there instantly.

The README File

A README.md file is the front page of your GitHub repo. Write it in Markdown. It should explain what the project is, how to run it, and how to contribute.

Markdown — README template
# Project Name A short description of what this project does. ## Getting Started ```bash npm install npm run dev ``` ## What it does - Feature 1 - Feature 2 ## Built with - HTML, CSS, JavaScript

GitHub Pages — Free Hosting

GitHub Pages lets you host a static website for free directly from a repository. Perfect for portfolios, documentation, and landing pages.

  1. 1Go to your repo → SettingsPages.
  2. 2Under "Source", select Deploy from a branch, choose main, folder / (root).
  3. 3Click Save. Your site will be live at yourusername.github.io/repo-name in 1–2 minutes.