Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📖 کتاب جامع Git و GitHub

The Comprehensive Git & GitHub Book

یک مرجع کامل فارسی برای یادگیری Git و GitHub از صفر تا پیشرفته

A complete Persian reference for learning Git & GitHub from beginner to advanced

License Language Status Chapters Offline

📖 شروع مطالعه · 🌐 English · ⚡ Features · 📦 Install


🇮🇷 بخش فارسی

🌟 مقدمه

یک مرجع آموزشی فارسی، رایگان و متن‌باز که به شما کمک می‌کند از پایه تا سطح پیشرفته با دو ابزار حیاتی دنیای توسعه‌ی نرم‌افزار یعنی Git و GitHub آشنا شوید.

این کتاب با هدف یادگیری عملی و کاربردی طراحی شده است. نه تنها دستورات را به شما آموزش می‌دهد، بلکه شما را با مفاهیم عمیق‌تر مثل نحوه‌ی کار داخلی Git، استراتژی‌های branching، جریان کاری Pull Request، اتوماسیون CI/CD با GitHub Actions و حتی حل مشکلات رایج آشنا می‌کند. اگر دانشجو، توسعه‌دهنده‌ی تازه‌کار یا حتی یک مهندس باتجربه هستید که می‌خواهد دانش خود را عمیق‌تر کند، این کتاب برای شماست.

تمام مباحث این کتاب به صورت یک صفحه‌ی HTML تک‌صفحه‌ای و کاملاً آفلاین ارائه شده است؛ به این معنی که هیچ وابستگی به اینترنت یا منابع خارجی ندارد و پس از دانلود، در هر دستگاه و هر مرورگری قابل مطالعه است. طراحی مدرن و تیره (Dark Mode)، راست‌چین بودن متن فارسی، نمودارهای زیبا و بلاک‌های کد با قابلیت کپی، تجربه‌ی مطالعه‌ای روان و لذت‌بخش را برای شما فراهم می‌کنند.


✨ ویژگی‌ها

  • 🎨 طراحی Dark Modern - پالت رنگی Catppuccin Mocha با اکسنت‌های بنفش و فیروزه‌ای
  • 📚 ۲۲ فصل جامع + جلد + واژه‌نامه
  • 🇮🇷 راست‌چین (RTL) - فونت فارسی Vazirmatn برای خوانایی بهتر
  • 📊 ۱۸ نمودار تعاملی - با Mermaid.js (به زبان انگلیسی)
  • 💻 ۶۸+ بلاک کد - با syntax highlighting و دکمه‌ی Copy
  • 🔍 جستجوی آنی - با میانبر Ctrl+K در سراسر کتاب
  • 📑 Sidebar هوشمند - فهرست خودکار با فعال‌سازی بر اساس اسکرول
  • ⌨️ ناوبری با کیبورد - جابه‌جایی بین فصل‌ها با کلیدهای جهت‌دار
  • 📱 ریسپانسیو - قابل استفاده در موبایل، تبلت و دسکتاپ
  • 🔌 کاملاً آفلاین - هیچ درخواست خارجی انجام نمی‌شود
  • 🖨️ آماده‌ی چاپ - استایل print برای خروجی PDF تمیز

📚 فهرست مباحث

کتاب شامل ۲۲ فصل در ۶ بخش اصلی است:

# فصل موضوع
۱ تاریخچه Git از BitKeeper تا الان
۲ مقایسه با VCSها Git vs SVN/Mercurial/Perforce
۳ مبانی Git Working Directory، Staging، Repository
۴ نصب و تنظیم Windows، macOS، Linux + SSH
۵ دستورات پایه init، add، commit، status، log، diff
۶ مفاهیم داخلی Objects، Hashes، Refs، Reflog
۷ Branching ایجاد، حذف، تعویض شاخه‌ها
۸ Rebase vs Merge تفاوت‌ها و کاربردها
۹ حل Conflict روش‌های دستی و خودکار
۱۰ استراتژی‌های Branching Git Flow، GitHub Flow، Trunk-Based
۱۱ GitHub راه‌اندازی Fork، Clone، PAT، SSH
۱۲ Pull Request چرخه‌ی کامل PR و code review
۱۳ Issues و Projects مدیریت پروژه در GitHub
۱۴ GitHub Actions CI/CD خودکار
۱۵ GitHub Pages هاست رایگان استاتیک
۱۶ Undo و Reset revert، reset، restore
۱۷ Stash و Cherry-pick ابزارهای پیشرفته
۱۸ Submodules و Worktrees ساختارهای پیچیده repo
۱۹ Hooks و Config سفارشی‌سازی Git
۲۰ Troubleshooting حل ۸ مشکل رایج
۲۱ Best Practices Markdown، لایسنس‌ها، commit messages
۲۲ Cheat Sheet مرجع سریع تمام دستورات
  • واژه‌نامه اصطلاحات تخصصی

🚀 شروع به کار

روش ۱: اجرای مستقیم (ساده‌ترین)

فایل index.html را با مرورگر خود باز کنید:

# macOS
open index.html

# Linux
xdg-open index.html

# Windows
start index.html

روش ۲: سرور محلی (توصیه شده)

برای تجربه‌ی بهتر (مخصوصاً برای بارگذاری فونت‌ها و ماژول‌های JS)، از یک سرور محلی استفاده کنید:

# با Python
python3 -m http.server 8000

# با Node.js (اگر http-server نصب است)
npx http-server -p 8000

# سپس در مرورگر باز کنید:
# http://localhost:8000

روش ۳: استفاده از نسخه آنلاین

اگر نمی‌خواهید دانلود کنید، می‌توانید نسخه‌ی آنلاین را مشاهده کنید:

🌐 https://a-talebifard.github.io/git-github-book/


📦 نصب و اجرا

پیش‌نیازها

هیچ پیش‌نیازی وجود ندارد! فقط یک مرورگر وب مدرن (Chrome، Firefox، Safari، Edge).

مراحل

  1. دانلود پروژه:

    git clone https://github.com/A-talebifard/git-github-book.git
    cd git-github-book
  2. باز کردن در مرورگر:

    open index.html  # یا drag-and-drop در مرورگر
  3. شروع مطالعه! 🎉


⌨️ میانبرهای صفحه‌کلید

کلید عملکرد
Ctrl + K باز کردن جستجو
Esc بستن جستجو
رفتن به فصل بعدی
بازگشت به فصل قبلی
Enter انتخاب نتیجه جستجو

🛠️ Deploy روی GitHub Pages

اگر می‌خواهید نسخه‌ی خودتان را deploy کنید:

# 1. یک repo جدید در GitHub بسازید

# 2. فایل‌ها را push کنید
git init
git add .
git commit -m "Initial commit: Git & GitHub book"
git branch -M main
git remote add origin git@github.com:USERNAME/REPO-NAME.git
git push -u origin main

# 3. در GitHub:
#    Settings → Pages → Source: main branch → /(root)

# 4. سایت در https://USERNAME.github.io/REPO-NAME/ در دسترس خواهد بود

🤝 مشارکت

اگر می‌خواهید در بهبود این کتاب مشارکت کنید:

  1. Repo را Fork کنید
  2. یک branch جدید بسازید (git switch -c feature/improvement)
  3. تغییرات را commit کنید (git commit -m 'Add amazing feature')
  4. Push کنید (git push -u origin feature/improvement)
  5. یک Pull Request باز کنید

پیشنهادات، رفع باگ‌ها و ایده‌های فصل جدید همگی welcome هستند! 🙌


📞 تماس با نویسنده

A-Talebifard — Full-Stack Engineer; WebGIS Developer; GeoAI Specialist


📄 لایسنس

© ۱۴۰۴ A-Talebifard. تمام حقوق محفوظ است.

این پروژه به صورت رایگان در دسترس همگان قرار گرفته است. اگر این کتاب برای شما مفید بود، خوشحال می‌شوم آن را با دیگران به اشتراک بگذارید. ⭐



🇬🇧 English Section

🌟 Introduction

Welcome to The Comprehensive Git & GitHub Book - a free, open-source Persian educational reference that helps you master Git and GitHub from the ground up to an advanced level.

This book is designed for practical, hands-on learning. It doesn't just teach you commands — it walks you through deeper concepts like Git's internal workings, branching strategies, the Pull Request workflow, CI/CD automation with GitHub Actions, and even troubleshooting common issues. Whether you're a student, a beginner developer, or an experienced engineer looking to deepen your knowledge, this book has something for you.

The entire content is delivered as a single-page HTML application that works completely offline — no internet connection or external resources required. Once downloaded, you can read it on any device, in any browser. The modern dark theme, right-to-left Persian text rendering, beautiful Mermaid diagrams, and copy-able code blocks create a smooth and enjoyable reading experience.


✨ Features

🎨 Dark Modern Design - Catppuccin Mocha color palette with purple and teal accents 📚 22 Comprehensive Chapters + Cover + Glossary 🇮🇷 RTL (Right-to-Left) - Vazirmatn Persian font for better readability 📊 18 Interactive Diagrams - with Mermaid.js (in English) 💻 68+ Code Blocks - with syntax highlighting and Copy button 🔍 Instant Search - with Ctrl+K shortcut across the entire book 📑 Smart Sidebar - Auto-generated table of contents with scroll-activated highlighting ⌨️ Keyboard Navigation - Navigate between chapters using arrow keys 📱 Responsive - Usable on mobile, tablet, and desktop 🔌 Fully Offline - No external requests are made 🖨️ Print-Ready - Print styles for clean PDF output


📚 Table of Contents

The book includes 22 chapters across 6 main sections:

# Chapter Topic
1 History of Git From BitKeeper to now
2 Comparison with VCS Git vs SVN/Mercurial/Perforce
3 Git Basics Working Directory, Staging, Repository
4 Installation & Setup Windows, macOS, Linux + SSH
5 Basic Commands init, add, commit, status, log, diff
6 Internals Objects, Hashes, Refs, Reflog
7 Branching Create, delete, switch branches
8 Rebase vs Merge Differences and use cases
9 Conflict Resolution Manual and automatic methods
10 Branching Strategies Git Flow, GitHub Flow, Trunk-Based
11 GitHub Setup Fork, Clone, PAT, SSH
12 Pull Request Complete PR workflow and code review
13 Issues & Projects Project management in GitHub
14 GitHub Actions CI/CD automation
15 GitHub Pages Free static hosting
16 Undo & Reset revert, reset, restore
17 Stash & Cherry-pick Advanced tools
18 Submodules & Worktrees Complex repo structures
19 Hooks & Config Git customization
20 Troubleshooting Solving 8 common issues
21 Best Practices Markdown, licenses, commit messages
22 Cheat Sheet Quick reference for all commands
  • Glossary of technical terms

🚀 Getting Started

Option 1: Direct Execution (Simplest)

Open the index.html file in your browser:

# macOS
open index.html

# Linux
xdg-open index.html

# Windows
start index.html

Option 2: Local Server (Recommended)

For a better experience (especially for loading fonts and JS modules), use a local server:

# With Python
python3 -m http.server 8000

# With Node.js (if http-server is installed)
npx http-server -p 8000

# Then open in browser:
# http://localhost:8000

Option 3: View Online Version

If you don't want to download, you can view the live version:

🌐 https://a-talebifard.github.io/git-github-book/


📦 Installation & Usage

Prerequisites

None! Just a modern web browser (Chrome, Firefox, Safari, Edge).

Steps

  1. Download the project:

    git clone https://github.com/A-talebifard/git-github-book.git
    cd git-github-book
  2. Open in browser:

    open index.html  # or drag-and-drop into browser
  3. Start reading! 🎉


⌨️ Keyboard Shortcuts

Key Action
Ctrl + K Open search
Esc Close search
Next chapter
Previous chapter
Enter Select search result

🛠️ Deploy to GitHub Pages

If you want to deploy your own version:

# 1. Create a new repository on GitHub

# 2. Push the files
git init
git add .
git commit -m "Initial commit: Git & GitHub book"
git branch -M main
git remote add origin git@github.com:USERNAME/REPO-NAME.git
git push -u origin main

# 3. On GitHub:
#    Settings → Pages → Source: main branch → /(root)

# 4. Your site will be available at https://USERNAME.github.io/REPO-NAME/

🤝 Contributing

If you'd like to help improve this book:

  1. Fork the repository
  2. Create a new branch (git switch -c feature/improvement)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push (git push -u origin feature/improvement)
  5. Open a Pull Request

Suggestions, bug fixes, and new chapter ideas are all welcome! 🙌


📞 Contact the Author

A-Talebifard — Full-Stack Engineer; WebGIS Developer; GeoAI Specialist


📄 License

© 2025 A-Talebifard. All rights reserved.

This project is freely available to everyone. If this book was helpful to you, I'd appreciate it if you share it with others. ⭐


⬆ بازگشت به بالا · ⬆ Back to top

Made with ❤️ for the Persian developer community

About

A complete Persian reference for learning Git and GitHub from beginner to advanced. Includes 22 chapters, interactive diagrams, practical code examples, instant search, modern design, and fully offline functionality. Suitable for students, developers, and software teams. Written by A-Talebifard and released under the MIT license

Resources

Stars

24 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages