পাঠ ২৩ · ২৫-এর মধ্যে · মডিউল ৩

Git ও GitHub-এ AI প্রজেক্ট

Git for AI projects — version control done right
৭ মিনিট পড়া শুরু · Beginner command-line

এই পাঠে যা শিখবেন

  • Git core mental model — commit, branch, remote
  • প্রথম repo — init, add, commit, push
  • Branch ও pull request workflow
  • AI project-এ কী কী commit করবেন না
  • Git LFS — বড় file
  • DVC — dataset ও model versioning
  • Notebook commit-এর সাবধানতা

১ · Git কী, কেন

GitGit২০০৫-এ Linus Torvalds-এর তৈরি distributed version control system — Linux kernel development-এর জন্য। আজ পৃথিবীর ৯০%+ software এতে ট্র্যাক। SHA-1 (এখন SHA-256) hash দিয়ে content-addressable storage। = code-এর সময় যন্ত্র। প্রতিটি save (commit) এক snapshot। ভুল করলে — rewind। নতুন idea try করতে — branch বানান। দু'জন একই file-এ কাজ — merge। AI project-এ — model evolve করে, hyperparameter বদলায়, experiment চলে — সব Git ছাড়া track করা অসম্ভব।

Git-এর তিন এলাকা

১) Working directory: আপনি যে file edit করছেন।
২) Staging area: next commit-এ যা যাবে — git add।
৩) Repository: commit history — git commit।

Git = ফটোগ্রাফার। আপনি কাজ করছেন (working dir)। ভাল মুহূর্তে — "এই অংশ ছবিতে রাখো" (git add) → ছবি তোলা (git commit)। সব ছবি album-এ (.git folder)। চাইলে যে কোনো পুরোনো ছবিতে ফিরে যেতে পারেন।

২ · প্রথম repo — init থেকে commit

Terminal · git basics
# (১) প্রথমবার Git config — name & email
git config --global user.name "আপনার নাম"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main

# (২) Project folder-এ
cd my_ml_project
git init                    # .git folder তৈরি

# (৩) File বানানো বা copy
echo "# My ML Project" > README.md

# (৪) Status check
git status                  # কোন file untracked / modified

# (৫) Stage + commit
git add README.md           # বা: git add .
git commit -m "Initial commit: project README"

# (৬) History দেখা
git log --oneline
প্রথম commit হল আপনার project-এর time zero। এর পর প্রতিটি change-ই trackable। git log-এ পুরো history।

৩ · GitHub-এ push — দূরবর্তী backup ও sharing

Local git → cloud-এ push করলে — backup, collaboration, portfolio। GitHub সবচেয়ে জনপ্রিয়; GitLab, Bitbucket alternatives।

Terminal · push to GitHub
# (১) GitHub-এ একটি new repo বানান (web UI-তে)
#     নাম: my-ml-project, public বা private

# (২) Remote add করুন (URL UI-তে দেখাবে)
git remote add origin https://github.com/yourname/my-ml-project.git

# (৩) Push — first time -u দিয়ে track set
git push -u origin main

# (৪) এর পর প্রতিবার শুধু
git push

# (৫) অন্য জায়গা থেকে clone
git clone https://github.com/yourname/my-ml-project.git
২০২১ থেকে GitHub-এ password authentication বন্ধ। Personal Access Token (PAT) বা SSH key ব্যবহার। gh auth login (GitHub CLI) সবচেয়ে সহজ।

৪ · Branch ও pull request — collaboration heart

Main branch = stable production code। নতুন feature বা experiment — আলাদা branch-এ। ঠিকঠাক হলে — merge।

Terminal · branch workflow
# Current branch দেখা
git branch

# নতুন branch বানিয়ে switch
git checkout -b feature/add-knn-model

# কাজ → stage → commit
# ... edit files ...
git add src/knn.py
git commit -m "Add KNN classifier with grid search"

# Push করে remote-এ
git push -u origin feature/add-knn-model

# GitHub-এ গিয়ে Pull Request (PR) open
# Reviewer approve করলে — merge to main

# Local-এ main update
git checkout main
git pull
git branch -d feature/add-knn-model    # local cleanup

৫ · AI project-এ কী commit করবেন না

Git-এ commit করা মানে — চিরকালের জন্য history-তে। তাই এই গুলো প্রথমেই .gitignore-এ:
  • Secrets: .env, API key, database password, token।
  • Virtual env: .venv/, __pycache__/ — MB-GB binary।
  • Big data: raw CSV ১০০MB, image folder GB — Git slow হবে।
  • Trained model: model.pkl, checkpoint.pt — Git LFS বা DVC ব্যবহার।
  • Notebook output: .ipynb_checkpoints/, output cell-এ embedded plot। nbstripout।
  • OS / IDE artifact: .DS_Store, Thumbs.db, .idea/, .vscode/settings.json।

৬ · একটি ভাল ML .gitignore

.gitignore · ML project
# Python
__pycache__/
*.py[cod]
*.egg-info/
build/
dist/

# Virtual env
.venv/
venv/
env/

# Jupyter
.ipynb_checkpoints/

# Secrets
.env
.env.local
*.key
*.pem

# Data (LFS বা DVC ব্যবহার করুন)
data/raw/
data/processed/
*.csv.gz
*.parquet

# Trained models
models/*.pkl
models/*.pt
models/*.h5
models/*.onnx
*.ckpt

# Logs & results
runs/
wandb/
mlruns/
*.log

# IDE
.vscode/
.idea/
*.swp

# OS
.DS_Store
Thumbs.db

৭ · Git LFS — বড় binary file

Git ছোট text file-এ optimal। ১০০MB+ binary commit — repo bloat, push slow। Git LFSGit LFS (Large File Storage)GitHub-এর extension — large binary file আলাদা storage-এ, Git-এ শুধু pointer। Image, model checkpoint, dataset-এর জন্য। GitHub free tier-এ 1GB+1GB bandwidth/month। এই সমস্যার সমাধান। File-এর pointer Git-এ, content separate storage-এ।

Terminal · Git LFS
# Install (একবার, OS-অনুযায়ী)
# Mac: brew install git-lfs
# Linux: sudo apt install git-lfs
# Windows: download from git-lfs.com

# Init LFS in repo
git lfs install

# কোন file LFS-এ track হবে
git lfs track "*.pkl"
git lfs track "*.h5"
git lfs track "*.ckpt"

# .gitattributes commit করুন
git add .gitattributes
git commit -m "Track large model files with Git LFS"

# এখন এসব file স্বাভাবিকভাবে add/commit, কিন্তু LFS-এ store
git add models/best_model.pkl
git commit -m "Add trained Random Forest model"
git push
Git workflow — local থেকে remote working dir → staging → repo → remote Working dir আপনার edit (modified files) git add Staging area next commit-এ যা (index) git commit Local repo .git/ history (local commits) git push GitHub remote (cloud) AI প্রজেক্টের তিন storage layer Git (text) .py, .md, requirements config, notebook (clean) ~MB scale commit + diff friendly Git LFS (binary) model.pkl, .h5, .onnx small image, font ~100 MB scale pointer in git DVC / S3 (data) raw dataset, processed multi-GB checkpoint ~GB-TB scale .dvc file in git নিয়ম: text → Git, binary → LFS, dataset/checkpoint → DVC বা S3 .gitignore-এ সেক্রেট, cache, virtualenv — কখনো commit নয় "আমি কী version control করছি — code, model, না data?" — সচেতন সিদ্ধান্ত
উপরে — git-এর চারটি stage। নিচে — AI project-এর data, model, code আলাদা storage-এ।

৮ · DVC — dataset ও experiment versioning

DVCData Version Control (DVC)২০১৭-এ Iterative.ai-এর open-source tool। Git-এর উপর data, model, pipeline versioning। Cloud storage-এ (S3, GDrive, Azure) actual file; Git-এ ছোট .dvc metadata। ML reproducibility-এর জন্য industry standard হয়ে উঠছে। = Git-এর "data sibling"। Big data, model, pipeline track করে। Actual data S3/GDrive-এ; Git-এ শুধু hash + metadata।

Terminal · DVC quickstart
# Install
pip install dvc

# Init in git repo
dvc init
git add .dvc .gitignore
git commit -m "Initialize DVC"

# Big dataset track
dvc add data/raw/train.csv      # auto data/raw/.gitignore + .dvc file

# Git-এ track শুধু .dvc file (small)
git add data/raw/train.csv.dvc data/raw/.gitignore
git commit -m "Track training data with DVC"

# Remote storage configure
dvc remote add -d storage s3://my-bucket/dvc-store
# Or: dvc remote add -d storage gdrive://folder-id

# Push actual data
dvc push

# অন্য জায়গা থেকে restore
git clone https://github.com/...
dvc pull       # data + model আনে S3 থেকে

৯ · Notebook commit-এর সাবধানতা

Notebook (.ipynb) JSON ফাইল — output, image base64-এ embed। Git-এ raw commit = ১ লাইন code change → ৩০০ লাইন diff। সমাধান:

  • nbstripout: commit-এর আগে output strip। pip install nbstripout && nbstripout --install।
  • jupytext: notebook-কে paired .py/.md auto-sync — Git-এ .py commit।
  • nbdime: semantic notebook diff/merge tool।
  • Final notebook: "Restart & Run All" → output রাখুন (সংরক্ষণের জন্য) → tagged release।
Notebook output-এ secret print হলে — git history-তে চিরকালের। Commit-এর আগে output check করুন। Better — secret কখনোই notebook-এ না।

ভাবনার প্রশ্ন

প্রতিটি প্রশ্ন নিজে কিছুক্ষণ ভাবুন — তারপর "→ উত্তর" চাপুন।

প্র ০১ Linus Torvalds ২০০৫-এ ১০ দিনে Git বানিয়ে ফেলেছিলেন। কেন? BitKeeper crisis, Linux kernel scale, distributed model — তিন factor। Git-এর design choice কেন এতটা durable?

Git-এর জন্ম একটি crisis-এ। ২০০২ থেকে Linux kernel BitKeeper (proprietary VCS) ব্যবহার করত — Larry McVoy বিনামূল্যে দিয়েছিলেন kernel community-কে। ২০০৫-এ disagreement → BitKeeper free version withdraw। Linus-এর কাছে দু'টি option: existing OSS VCS-এ স্বীকার, বা নতুন বানানো। তিনি ২য়টি বেছে নিলেন।

চয়ন-এর কারণ — existing tool কেন insufficient:

  • CVS/SVN: centralized — single server failure = sad day। Linus-এর "distributed" need।
  • Performance: Linux kernel ১M+ line, ১০K+ contributor। CVS minute-level slow।
  • Branching: SVN-এ branch heavy operation। Linus-এর "branch should be cheap, free, plentiful" requirement।
  • Integrity: SHA1 content addressing — tampering detection।
  • Speed: "cheaper than thinking" — local operation network-roundtrip ছাড়া।

Linus-এর design principles:

  1. Distributed by default: প্রত্যেকের local-এ full repo।
  2. Content-addressable storage: file = SHA1 hash। Same content = same hash।
  3. Snapshot, not delta: commit = full snapshot pointer; storage-এ deduplication।
  4. Cheap branching: branch = pointer to commit। Free creation।
  5. Strong integrity: SHA chain — tampering detect-able।
  6. Speed > UX: "complexity is okay if performance demands"।

প্রথম ১০ দিন (April ২০০৫):

  • April 3 — design start।
  • April 7 — first self-hosted commit ("the actual git project")।
  • April 18 — usable enough for kernel।
  • June — kernel migration complete।

Initial criticism:

  • "Confusing UI" — porcelain commands counter-intuitive।
  • "Steep learning curve" — staging area, rebase, detached HEAD।
  • "Mercurial easier" — Hg-ও same time-এ design, friendlier UX।

কেন Git tested time:

  • GitHub (২০০৮): hosting + UI + community → critical mass।
  • Performance: বড় repo-এও fast। Hg performance কম।
  • Open Source: permissive license, community-driven evolution।
  • Network effect: developer-রা মুভ — tooling মুভ — IDE মুভ। Switching cost বিশাল।
  • Mercurial decline: Bitbucket Hg drop (২০২০) — final nail।

২০২৬-এ Git-এর state:

  • ৯০%+ open-source project Git।
  • SHA1 → SHA256 transition (slow)।
  • Partial clone, sparse checkout — mega-monorepo support।
  • Improved UX (git switch, restore — porcelain modernization)।
  • AI integration (CoPilot, gh CLI AI assist)।

Critical voices:

  • "Plumbing vs porcelain" — internal model leaking through commands।
  • Submodule ভয়ঙ্কর UX।
  • Merge conflict resolution often painful।
  • Pijul, jujutsu — newer attempts at better DAG model।

বৃহত্তর পাঠ:

  • Crisis-driven innovation: Linus 10-day produce — necessity strong motivator।
  • Right primitive selection: content-addressable + snapshot model — durable foundation।
  • Network effect bites both ways: Git-এর alternative replace করা প্রায় অসম্ভব এখন।
  • UX matters less than power initially: Git-এর confusing UX-ও tolerated কারণ underlying model strong।

মূল উপলব্ধি: Git-এর সাফল্য = right design + right time + right ecosystem। Linus-এর engineering judgment legendary। ২০ বছর পরেও — ML community নতুন ছাত্র Git শিখছে। Tool নয় — paradigm। Distributed, snapshot-based, content-addressable — যা VCS-এর "operating system"। সম্ভবত বদলাবে; কিন্তু আগের ১০ বছর চলবে।

প্র ০২ ML "experiment tracking" — Git, MLflow, Weights & Biases, DVC — চারটি tool কোন কী work করে? পেশাদার ML workflow-এ কীভাবে combine?

ML experiment = একটি hyperparameter set + একটি training run + একটি result। ১০ experiment ঠিক, ১০০ — মনে রাখা অসম্ভব। Tracking নাহলে — "তিন সপ্তাহ আগে যে ৯৩% accuracy পেয়েছিলাম, সেই config কী ছিল?" সমস্যা।

চারটি tool, চারটি concern:

(১) Git — code & config:

  • What it does: code, config, README — text version control।
  • Strength: universal, free, distributed, ৩০-year proven।
  • Weakness: large file weak, dataset/model weak, experiment metadata নেই।
  • ML use: source code, requirements.txt, Dockerfile, hyperparameter YAML।

(২) DVC — data & model:

  • What it does: large file via cloud storage, version-tracked।
  • Strength: Git-এর extension, S3/GDrive-agnostic, pipeline definition।
  • Weakness: experiment comparison UI সীমিত, web dashboard নেই।
  • ML use: dataset versioning, trained model checkpoint, pipeline reproducibility।

(৩) MLflow — experiment lifecycle:

  • What it does: log metric/param/artifact, model registry, deployment।
  • Strength: open-source, self-hostable, framework-agnostic, ৪ component (tracking, projects, models, registry)।
  • Weakness: UI dated, scaling এ heavy server।
  • ML use: training run track, A/B compare, prod registry।

(৪) Weights & Biases (W&B):

  • What it does: experiment tracking, hyperparameter sweep, dataset/model artifact, report sharing।
  • Strength: best-in-class UI, real-time dashboard, team collaboration, integration ১০০+ framework।
  • Weakness: SaaS — enterprise-এ pricing climbs; data leaving organization।
  • ML use: research labs, model debugging, paper figure generation।

সাধারণ workflow:

# Code & config — Git
git checkout -b experiment/lr-tuning

# Data — DVC (already setup)
dvc pull                   # latest data

# Run experiment — log to W&B (or MLflow)
import wandb
wandb.init(project="iris-classification",
           config={"lr": 0.01, "model": "logreg"})
# ... training ...
wandb.log({"accuracy": 0.97})
wandb.save("model.pkl")    # artifact upload

# Best result-এ Git commit + push
git add .
git commit -m "Best config: lr=0.01, accuracy=0.97"
git push

# Model registry-এ promote
mlflow models register -m wandb-uri/best-run/model -n iris-prod

সিদ্ধান্ত matrix:

  • Solo learner: Git only।
  • Solo ML practitioner: Git + W&B (free tier)।
  • Small team: Git + DVC + MLflow।
  • Research lab: Git + DVC + W&B।
  • Enterprise: Git + DVC + MLflow + own model registry।

আধুনিক alternatives:

  • Comet ML: W&B-র closest competitor।
  • Neptune.ai: metadata management focus।
  • Aim: open-source W&B alternative।
  • ClearML: open-source full lifecycle।
  • SageMaker / Vertex AI: cloud-managed end-to-end।
  • Hugging Face Hub: model + dataset versioning, free tier generous।

Common antipattern:

  • Excel-এ experiment log — copy-paste error।
  • Google Sheet shared — no automation, manual update।
  • Pickle local-এ — laptop crash = সব lost।
  • "Notebook-এ output cell-ই my log" — Restart Run All-এ মুছে যায়।

Discipline tips:

  • প্রতিটি run-এ unique ID (W&B/MLflow auto)।
  • Hyperparameter config file-এ — code-এ hardcode না।
  • Random seed log।
  • Git commit hash log — কোন code এই run-এ।
  • Dataset version log — কোন data।
  • Hardware (GPU type, RAM) log।

মূল উপলব্ধি: ML experiment tracking = scientific notebook-এর digital version। ছোট কাজে — Git + simple log যথেষ্ট। Mid-size কাজে — W&B অসামান্য productivity। Production-এ — MLflow + DVC + registry। Tool বাছার চেয়ে — discipline বেশি গুরুত্বপূর্ণ। লগ লেখা = science, না লেখা = guesswork।

প্র ০৩ "Conflict-free" merge — strategy। Rebase vs merge — কখন কোনটা? Trunk-based development বনাম Git Flow — modern team কোনটায় যাচ্ছে?

Multi-developer ML team-এ — branching strategy ও merge philosophy পুরো workflow-কে define করে। দু'টি দল আছে: rebase camp ও merge camp। Religious war-ই বটে।

Merge — preserves history:

git checkout main
git merge feature/knn   # creates merge commit
  • Branch-এর full history main-এ।
  • Merge commit visible — audit trail।
  • Non-destructive — original commits unchanged।
  • "True history" preserve।
  • Cons: history non-linear, "spaghetti" graph।

Rebase — linear history:

git checkout feature/knn
git rebase main         # replay branch on top of main
git checkout main
git merge feature/knn   # fast-forward
  • Linear, clean history।
  • Each commit-এ branch-এর "ideal" history।
  • git log readable।
  • Cons: rewrites commit hash; shared branch-এ never rebase।

Squash merge — single commit:

# GitHub PR "Squash and merge" button
  • Branch-এর সব commit → main-এ ১টি commit।
  • Main super clean; ১ feature = ১ commit।
  • Cons: branch-এর fine-grained history lost।

Standard approach:

  • Open source / public — merge (preserves contributor history)।
  • Internal team — squash (clean main, branch unimportant)।
  • Solo / personal — rebase (clean linear)।

Branching strategy — Git Flow:

  • main: production releases।
  • develop: ongoing development।
  • feature/*: new feature off develop।
  • release/*: release candidate prep।
  • hotfix/*: production emergency।

Vincent Driessen ২০১০-এ propose; ২০১৫ পর্যন্ত popular।

  • Pros: clear roles, release-cadence support।
  • Cons: complex, slow, ৬টা branch type heavy।

Trunk-based development (২০২০+):

  • একটাই long-lived branch — main (trunk)।
  • Feature branch ≤১-২ দিন।
  • Daily merge to main।
  • Feature flag-এ incomplete feature hidden।
  • CI/CD → main commit-এ auto deploy।

Pros:

  • Faster integration — merge conflict ছোট।
  • Continuous delivery natural।
  • Branch baggage কম।
  • Google, Facebook, Spotify — সব trunk-based।

Cons:

  • CI/CD discipline mandatory।
  • Test coverage strong লাগে — main always green।
  • Feature flag complexity।
  • Junior developer-এ direct main commit risky।

GitHub Flow — middle ground (most popular):

  • main = production।
  • প্রতিটি feature = branch off main → PR → review → merge।
  • Branch life ১-৭ days।
  • সরল, repeatable।

ML-specific challenge:

  • Notebook merge conflict — text not friendly। nbdime tool।
  • Long-running experiments — branch দীর্ঘ। Push intermediate result।
  • Hyperparameter sweep — branch explosion। DVC pipeline + experiment tracking।
  • Model file LFS conflict — usually overwrite latest।

Conflict avoidance practical tips:

  • Frequent git pull --rebase — small conflict early।
  • Small PR — conflict probability কম।
  • Modular code — different file → different developer।
  • Pre-merge: git pull origin main && rebase।
  • Communication — "এই file আমি touch করছি"।

সমাধান-এর tools:

  • git mergetool + meld/kdiff3 — visual merge।
  • VS Code merge editor — three-way merge UI।
  • nbdime — notebook semantic merge।
  • GitHub Codespaces — same branch দেখা।

সমাধানের সিদ্ধান্ত:

  • Solo / learning: rebase, simple।
  • Open source: merge, preserve contribution history।
  • Small team: GitHub Flow + squash merge।
  • Mature team: Trunk-based + feature flag।
  • Regulated industry: Git Flow with strict review।

মূল উপলব্ধি: Branching strategy — team-এর culture-এর mirror। Strict process slow + safe; fast process risky + agile। Modern trend trunk-based + feature flag — কারণ CI/CD-র সাথে natural। কিন্তু premature adoption — disaster। প্রথমে discipline, পরে strategy।

প্র ০৪ GitHub portfolio — entry-level ML/data engineer-এর জন্য কী থাকা উচিত? Bangladesh-এর ছাত্র-গবেষকের জন্য specific tactics কী — README, project, profile optimization?

২০২৬-এ — GitHub profile = ML candidate-এর primary CV-equivalent। LinkedIn experience claim, GitHub demonstrate। Bangladesh থেকে international remote job বা grad school admission — দু'টোতেই key signal।

Recruiter ৩০ সেকেন্ডে যা দেখে:

  1. Profile README — kind of human এই person?
  2. Pinned 6 repo — best work?
  3. Commit graph — consistency, recent activity?
  4. Top language — claimed expertise match?
  5. Star count one repo — community recognition?

প্রতিটি element-এর strategy:

(১) Profile README:

  • Short bio: who, what, where।
  • Tech stack — concrete tool, not buzzword soup।
  • Current focus — "exploring transformer-based summarization"।
  • Open to opportunity — remote ML role, etc।
  • Contact — email, LinkedIn।
  • Avoid: emoji explosion, fake "fancy" badges।

(২) Pinned repos — quality over quantity:

  • ৪-৬টি যা showcase। ৪০টা half-baked-এর চেয়ে ৩টা polished।
  • Each repo: clear README, demo screenshot/GIF, run instructions, deployed link if web app।
  • Mix: ১টি ML project, ১টি tooling/library, ১টি contribution to open source।

(৩) ML project quality bar:

  • Real problem: tutorial Iris-এর বাইরে। Bangladesh-relevant data ভাল।
  • Reproducible: requirements.txt + clear setup। Recruiter ৫ minute-এ run করতে পারবেন।
  • Documented: README — problem, approach, result, learning।
  • Visualization: EDA plot, confusion matrix, ROC curve।
  • Honest result: "best-only" না — failure mode জানান।
  • Bonus: deployed (Streamlit/HF Spaces), tests, CI badge।

(৪) Bangladesh-relevant project ideas:

  • Bengali sentiment analysis — newspaper headlines।
  • Bangla handwritten digit recognition (Ekush dataset)।
  • Dhaka traffic prediction।
  • BD Stock Market analysis।
  • Pathao/Foodpanda-style ETA prediction।
  • BB exchange rate forecasting।
  • BBS data — district-wise socioeconomic clustering।
  • Crop disease classification (rice, jute)।
  • Bangla ASR (speech recognition) fine-tune।
  • Local hospital demand prediction।

(৫) README template — ML project:

# Project Title

One-line elevator pitch.

## 🎯 Problem
What problem this solves, why it matters.

## 📊 Dataset
Source, size, license. Reproducibility note.

## 🔬 Approach
- Preprocessing: ...
- Model: ...
- Why this model: ...

## 📈 Results
| Metric | Value |
|--------|-------|
| Accuracy | 0.92 |

[Confusion matrix image]

## 🚀 Run It Yourself
```bash
git clone ...
pip install -r requirements.txt
python main.py
```

## 💡 Learnings
What I'd do differently next time.

## 🛠 Tech Stack
Python, pandas, scikit-learn, ...

(৬) Open source contribution:

  • scikit-learn, pandas, hugging face — beginner-friendly issue।
  • Bengali NLP project — direct contribution।
  • Documentation fix — easy first PR।
  • Translation — Bengali README।
  • Hugging Face dataset — Bengali corpus upload।
  • "good first issue" tag search।

(৭) Commit graph health:

  • Daily small commit > weekly big commit।
  • Public commit থাকতে hot — settings-এ private contribution-ও show।
  • Authentic — fake automated commit detect হয়।

(৮) Anti-pattern — যা avoid:

  • "my-first-tutorial" এ ৪০টা repo।
  • Forked repo যেখানে কিছু change নেই।
  • README-হীন project।
  • Notebook output না clean — bloated commit।
  • Empty repo — পুরোনো plan।
  • Sensitive data leak — secret commit।

(৯) Bangladesh-specific tactics:

  • BUET, DU, BRAC University-র CS lab GitHub organization-এ contribute।
  • Local hackathon (BdAPPS, ICPC) winning project — properly document।
  • Bengali README + English — bilingual signal।
  • Local mentor (Facebook AI Bangladesh group) থেকে review।
  • Kaggle competition — link from GitHub।
  • Hugging Face Hub থেকে cross-link।

(১০) Time investment realistic:

  • ৩ মাস — basic profile + ৩ project।
  • ৬ মাস — polished portfolio।
  • ১ বছর — open source contribution + recognized work।
  • প্রতি সপ্তাহে ৫-১০ ঘণ্টা invested।

মূল উপলব্ধি: GitHub portfolio = scientific habit + creative output + technical execution। Quantity-র চেয়ে quality। Bangladesh-relevant problem + global-quality execution = unique competitive position। Junior থেকে junior-er distinguish — portfolio-ই। Resume বানানো আগে — GitHub plant করুন, water দিন, growth আসবেই।

অনুশীলন

  1. প্রথম repo: একটি folder বানান, git init করুন, একটি README.md ও একটি hello.py add ও commit করুন। GitHub-এ push করুন।
    mkdir my-first-repo && cd my-first-repo
    git init
    echo "# My First Repo" > README.md
    echo 'print("Hello Git!")' > hello.py
    git add .
    git commit -m "Initial commit: README and hello script"
    
    # GitHub-এ web UI থেকে empty repo বানান
    git remote add origin https://github.com/yourname/my-first-repo.git
    git branch -M main
    git push -u origin main
  2. Branch + PR: উপরের repo-তে নতুন branch feature/add-greeting, একটি function add করুন, push করুন, GitHub-এ PR open ও self-merge করুন।
    git checkout -b feature/add-greeting
    
    cat > hello.py <<'PY'
    def greet(name):
        return f"Hello, {name}!"
    
    if __name__ == "__main__":
        print(greet("Bangladesh"))
    PY
    
    git add hello.py
    git commit -m "Add greet() function"
    git push -u origin feature/add-greeting
    
    # এরপর GitHub-এ "Compare & pull request" button → PR → Merge
  3. ML .gitignore: উপরের repo-তে একটি ML-ready .gitignore add করুন। .venv, __pycache__, .env, *.pkl ignore হচ্ছে কি না test করুন।
    # পাঠ ৬-এর .gitignore copy
    # Test:
    mkdir -p .venv __pycache__ models
    touch .env models/test.pkl
    
    git status   # এসব show হবে না
    git check-ignore -v .venv/        # confirms ignored
    git check-ignore -v models/test.pkl

আরও পড়ুন · ABCL TECH-এ আপনার পরবর্তী পদক্ষেপ

GitHub নতুন? ফ্রি অ্যাকাউন্ট খুলুন github.com থেকে। Student হলে — GitHub Student Pack — Copilot সহ ১০০+ tool free।
পূর্ববর্তী পাঠ
পাঠ ২২ · virtualenv ও pip