惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Jina AI
Jina AI
罗磊的独立博客
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
I
InfoQ
月光博客
月光博客
博客园_首页
Vercel News
Vercel News
P
Proofpoint News Feed
GbyAI
GbyAI
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Here’s a beginner-friendly guide to GitHub, especially fo...
Kyle Y. Pars · 2026-05-24 · via DEV Community

Kyle Y. Parsotan

🚀 GitHub for Beginners (Forks, Pull Requests, and Collaboration)

GitHub is where developers store code, collaborate, and contribute to projects. If Git is the engine, GitHub is the social platform built on top of it.

Let’s break it down simply.


🌍 1. What is GitHub?

GitHub is a website that hosts Git repositories online.

It lets you:

  • Store your code in the cloud
  • Collaborate with others
  • Contribute to open-source projects
  • Track changes and history

👉 Think of Git as your local notebook and GitHub as Google Drive for code.


🍴 2. What is a Fork?

A fork is a copy of someone else’s repository under your own GitHub account.

Why fork a repo?

  • You don’t have permission to edit the original project
  • You want to experiment safely
  • You want to contribute to open-source projects

How it works:

  1. You click Fork on GitHub
  2. GitHub creates a copy in your account
  3. You can edit freely without affecting the original project

🔄 3. What is a Pull Request (PR)?

A Pull Request is how you suggest changes to someone else’s project.

Think of it like:

“Hey, I made improvements—please review and add them to your project.”


🧠 Simple Flow:

  1. Fork a repo
  2. Clone it to your computer
  3. Make changes
  4. Push changes to your fork
  5. Open a Pull Request

🛠️ 4. Step-by-Step Workflow

Step 1: Fork a repository

On GitHub:

  • Open any repo you want to contribute to
  • Click Fork (top right corner)

Step 2: Clone your fork

```bash id="f8c1g2"
git clone https://github.com/your-username/repo-name.git
cd repo-name




---

## Step 3: Create a branch (important!)

Never work directly on main.



```bash id="b9k3m1"
git checkout -b my-feature

Enter fullscreen mode Exit fullscreen mode


Step 4: Make changes

Edit files normally in your code editor.


Step 5: Add and commit changes

```bash id="q2r7t9"
git add .
git commit -m "Add new feature or fix bug"




---

## Step 6: Push to your GitHub fork



```bash id="l4x8n3"
git push origin my-feature

Enter fullscreen mode Exit fullscreen mode


Step 7: Open a Pull Request

Go to your fork on GitHub:

  • Click “Compare & pull request”
  • Add a title and description
  • Click “Create Pull Request”

🔍 5. What happens after a Pull Request?

Once you submit a PR:

  • Maintainers review your code
  • They may request changes
  • You can update your PR with more commits
  • If approved → it gets merged 🎉

🔁 6. Keeping your fork updated

Original repos change over time. You need to sync your fork:

Add original repo as upstream:

```bash id="u1p9v5"
git remote add upstream https://github.com/original-owner/repo.git




### Pull latest changes:



```bash id="k7s2m8"
git fetch upstream
git merge upstream/main

Enter fullscreen mode Exit fullscreen mode


🧠 7. GitHub Concepts Cheat Sheet

Term Meaning
Repo Project folder on GitHub
Fork Your personal copy of a repo
Clone Download repo to your computer
Branch Separate working version
Commit Saved change
Pull Request Request to merge changes
Merge Combine changes into main project

⚠️ 8. Common Beginner Mistakes

❌ Working on main branch

Always use a feature branch.

❌ Forgetting to fork first

You usually cannot push directly to someone else’s repo.

❌ One huge commit

Break work into small, meaningful commits.


💡 9. Real-world example

Imagine you fix a typo in a website:

  1. Fork repo
  2. Clone it
  3. Fix typo
  4. Push change
  5. Submit PR
  6. Maintainer merges it

🎉 You just contributed to open source!


🧭 Final Thoughts

GitHub is all about collaboration and contribution. Once you understand forks and pull requests, you unlock the ability to:

  • Work on real projects
  • Contribute to open source
  • Build a developer portfolio
  • Work like professionals in tech companies

If you want next, I can show you:

  • 🧪 A practice open-source project to try your first PR
  • 💼 How companies actually use GitHub (real workflow)
  • 🧠 How to write a perfect pull request description
  • ⚡ GitHub Actions (CI/CD automation basics)

Just tell me 👍