Free tutorials & notes in Hindi & English · Clean code examples 🧰 मुफ़्त PDF और फ़ोटो टूल्स →
🚀 Week 9 – Deep Learning, Deploy और Career  ·  दिन 53

दिन 53: Git, GitHub और Portfolio

⏱ 2 hours📶 Beginner🎯 100% self-study
दिन 53 / 60

✅ आज आप सीखेंगे

  • हर data team Git क्यों इस्तेमाल करती है
  • रोज़ के commands: init, add, commit, push
  • Branches, pull requests और merge
  • Data के लिए project structure और .gitignore
  • ऐसा README और portfolio जो interviews दिलाए

🏢 असली दुनिया में

Recruiter के पास 200 applications और हर एक के लिए 30 सेकंड हैं। CV पर “pandas आता है” कुछ साबित नहीं करता; चार साफ़ projects, पढ़ने लायक READMEs और charts वाला GitHub link सब साबित करता है। आपकी भावी team भी रोज़ code share और review करने के लिए Git ही इस्तेमाल करेगी।

एक तस्वीर में Git

Working folder (files edit)git add → staging areagit commit → local historygit push → GitHub (online)
हर बदलाव एक snapshot की तरह save होता है जिस पर लौट सकते हैं

एक बार का setup

Terminal
# install: https://git-scm.com  (Windows: Git Bash)  |  check:
git --version
git config --global user.name  "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main

Professional project structure

Python
from pathlib import Path
root = Path("bazaarkart-sales-eda")
folders = ["data/raw", "data/processed", "notebooks", "src", "reports/figures", "app"]
for f in folders:
    (root / f).mkdir(parents=True, exist_ok=True)
(root / "src" / "__init__.py").write_text("")
(root / "src" / "clean.py").write_text('''"""Reusable cleaning functions for BazaarKart data."""
import pandas as pd

def load_sales(path: str) -> pd.DataFrame:
    df = pd.read_csv(path, parse_dates=["order_date"]).drop_duplicates()
    df["revenue"] = df["quantity"] * df["unit_price"] * (1 - df["discount"])
    return df
''')
(root / "requirements.txt").write_text("pandas==2.3.3\nmatplotlib==3.11.0\nseaborn==0.13.2\nscikit-learn==1.9.1\n")
(root / ".gitignore").write_text("__pycache__/\n.ipynb_checkpoints/\n.env\n*.joblib\ndata/raw/*.csv\n!data/raw/sample.csv\n")
for p in sorted(root.rglob("*")):
    depth = len(p.relative_to(root).parts) - 1
    print("    " * depth + ("📁 " if p.is_dir() else "📄 ") + p.name)
📄 .gitignore 📁 app 📁 data 📁 processed 📁 raw 📁 notebooks 📁 reports 📁 figures 📄 requirements.txt 📁 src 📄 __init__.py 📄 clean.py
⚠️ Secrets या बड़ा data कभी commit न करें

Passwords, API keys और .env files .gitignore में होनी चाहिए – bots मिनटों में GitHub पर leaked keys ढूँढते हैं। बड़ी या private CSVs भी commit न करें; छोटा sample दें और पूरा data पाने का तरीका बताएँ।

रोज़ का workflow

Terminal
cd bazaarkart-sales-eda
git init                                  # start tracking this folder
git status                                # what changed?
git add README.md src/ notebooks/         # stage files
git commit -m "Add cleaning function and EDA notebook"
git log --oneline                         # history

# connect to GitHub (create an empty repo on github.com first)
git remote add origin https://github.com/<your-username>/bazaarkart-sales-eda.git
git push -u origin main
Commandमतलब
git statusबदली / नई files दिखाएँ
git diffLine-दर-line बदलाव
git add fileबदलाव को अगले snapshot में डालें
git commit -m "msg"Message के साथ snapshot save
git log --onelineSnapshots की list
git restore fileFile के uncommitted बदलाव वापस
git pullGitHub से नया लाएँ
git pushअपने commits GitHub पर भेजें
💡 अच्छे commit messages

Present tense में क्या और क्यों लिखें: “Add festive-season feature to churn model”, न कि “changes” या “final_final_v3”। छोटे, तार्किक कदम commit करें।

Branches और pull requests

Terminal
git switch -c feature/add-rfm-segments     # new branch for an experiment
# ... edit, add, commit ...
git push -u origin feature/add-rfm-segments
# On GitHub: open a Pull Request → teammate reviews → "Merge"
git switch main
git pull                                    # main now has the merged work
  1. 1एक task के लिए branch बनाएँ
  2. 2वहाँ काम commit करें
  3. 3Pull request खोलें
  4. 4Review और चर्चा
  5. 5main में merge
Teams सुरक्षित रूप से कैसे साथ काम करती हैं

ऐसा README जो recruiters पढ़ें

Python
from pathlib import Path
readme = """# 🛒 BazaarKart 2024 Sales Analysis

**Question:** What drove BazaarKart’s ₹68.8 lakh revenue in 2024, and where should we invest in 2025?

## 🔑 Key findings
| # | Finding | Recommendation |
|---|---------|----------------|
| 1 | Oct–Nov brought **27%** of revenue in 17% of the year | Plan stock & staff 6 weeks before Diwali |
| 2 | Mumbai, Bengaluru, Delhi = **43%** of revenue | Same-day delivery in these metros |
| 3 | Bigger discounts did **not** raise quantity or rating | Replace blanket discounts with A/B-tested offers |
| 4 | 25–34 year-olds paying by UPI are the core customer | UPI cashback instead of COD promotions |

![Monthly revenue](reports/figures/monthly_revenue.png)

## 🧰 Tools
Python · pandas · Matplotlib · Seaborn · SQL (SQLite)

## 📂 Structure
```
data/        raw and processed data (raw CSVs not committed)
notebooks/   01_cleaning.ipynb, 02_eda.ipynb
src/         reusable functions (clean.py)
reports/     figures and the one-page summary
```

## ▶️ Run it
```bash
pip install -r requirements.txt
jupyter notebook notebooks/02_eda.ipynb
```

## 👤 Author
Your Name · [LinkedIn](https://www.linkedin.com/in/your-profile) · your.email@example.com
"""
Path("bazaarkart-sales-eda/README.md").write_text(readme, encoding="utf-8")
print(readme[:420] + "...")
print("README length:", len(readme.split()), "words")
# 🛒 BazaarKart 2024 Sales Analysis **Question:** What drove BazaarKart’s ₹68.8 lakh revenue in 2024, and where should we invest in 2025? ## 🔑 Key findings | # | Finding | Recommendation | |---|---------|----------------| | 1 | Oct–Nov brought **27%** of revenue in 17% of the year | Plan stock & staff 6 weeks before Diwali | | 2 | Mumbai, Bengaluru, Delhi = **43%** of revenue | Same-day delivery in these metros | | ... README length: 177 words
❓
सवालएक line: कौन सी business समस्या हल की?
📊
Numbers के साथ findings3–5 insights और सुझावों की table।
🖼️
एक बढ़िया chartबताएँ नहीं, दिखाएँ – chart project बेचता है।
▶️
कैसे चलाएँrequirements.txt और दो commands।
मज़बूत README के चार हिस्से

आपका portfolio plan (इसी course से)

Projectक्या दिखाता हैCourse days
BazaarKart sales EDApandas, cleaning, EDA, storytelling15–19, 24
HR / sales SQL warehouseSQL joins, CTEs, window functions32–35
नए checkout का A/B testStatistics, experiment design29–31
Telecom churn prediction + appML pipeline, metrics, deployment56–60
🧠 इसे अपना बनाएँ

Recruiters Titanic और Iris datasets हज़ार बार देख चुके हैं। अपना सवाल, data.gov.in या Kaggle से दूसरा dataset (Indian data अलग दिखता है), और अपने सुझाव जोड़ें।

Markdown – GitHub profile README (github.com/<username>/<username>)
### Hi, I'm Your Name 👋
Aspiring **Data Analyst / Data Scientist** · Python · SQL · Power BI · Machine Learning

📌 **Featured projects**
- 🛒 [BazaarKart Sales EDA](https://github.com/<username>/bazaarkart-sales-eda) – festive season = 27% of revenue
- 📞 [Telecom Churn Prediction](https://github.com/<username>/telecom-churn) – AUC 0.83, Streamlit app
- 🧪 [Checkout A/B Test](https://github.com/<username>/checkout-ab-test) – +2.9 pp conversion, p = 0.006

📫 your.email@example.com · [LinkedIn](https://www.linkedin.com/in/your-profile)

🏅 आज के Job Skills

✔ रोज़ के version control के लिए Git✔ Projects GitHub पर push करना और branches/PRs✔ .gitignore के साथ data projects का ढाँचा✔ काम दिखाने वाले portfolio READMEs लिखना

Practice tasks

🏋️ Practice – ख़ुद करें

Task 1: GitHub account बनाएँ (ज़रूरत हो तो), bazaarkart-sales-eda folder push करें और repository को profile पर pin करें।
Task 2: Branch बनाएँ, एक chart का रंग बदलें, ख़ुद को pull request खोलें और merge करें।
Task 3: अपने SQL project (Day 35) का README चार-हिस्से वाले ढाँचे से लिखें।

Quick quiz

🧠 Quick Quiz – ख़ुद को जाँचें

1. कौन सा command locally snapshot save करता है?
add stage करता, commit save करता, push upload करता।
2. .gitignore में क्या होना चाहिए?
Secrets और भारी files बाहर।
3. Pull request किसलिए?
GitHub पर code review।
4. git switch -c new-branch…
-c = create।
5. Portfolio README का सबसे ज़रूरी हिस्सा?
Recruiters पहले ऊपर पढ़ते हैं।

Interview corner

💼 Interview Corner

Data-science project का version control कैसे करते हैं?

Code, notebooks और छोटे sample data के लिए Git; secrets और बड़े data के लिए .gitignore; packages के लिए requirements.txt; data और models cloud storage या DVC जैसे tools में; साथ काम के लिए branches और pull requests।

अपने GitHub का एक project बताइए।

Business सवाल, data, अपने दो-तीन मुख्य कदम, number के साथ मुख्य नतीजा, और आगे क्या करते – से शुरू करें। दो मिनट से कम रखें और README खुला रखें।

सारांश

  • add → commit → push; status और log बताते हैं आप कहाँ हैं।
  • Branches + pull requests = सुरक्षित teamwork।
  • साफ़ structure, secrets/data के लिए .gitignore, requirements.txt।
  • Business-first READMEs वाले चार मज़बूत projects = आपका portfolio।
➡️ आगे

Day 54: resume, LinkedIn और job search – अपने projects को interview calls में बदलें।

अक्सर पूछे जाने वाले प्रश्न (FAQ)

Notebooks upload करूँ या .py files?
दोनों: outputs के साथ कहानी के लिए notebooks, reusable code के लिए .py modules। Commit से पहले बहुत बड़े cells के outputs साफ़ करें।
मैंने ग़लती से password commit कर दिया। अब?
Password/API key तुरंत बदलें (मानें कि leak हो गया), फिर GitHub के मार्गदर्शन या git filter-repo से history से हटाएँ, और file को .gitignore में जोड़ें।
← Data Science (60 Days)
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

अगला topicदिन 54: Resume, LinkedIn और Job Search आपकी प्रगति: 53 / 60 (88%) · Lesson 54 / 60 आगे बढ़ें →

यह lesson कैसा लगा?

आपकी राय से हम content और बेहतर बनाते हैं।

अपना review और सुझाव लिखें (वैकल्पिक)

Review approve होने के बाद आपका नाम और शहर इसके साथ public दिख सकते हैं। Email या phone न लिखें।

▶ CodingEasily on YouTube

Video से सीखें – आसान Hindi में

चुनी हुई video: RDBMS भाग 3 – Class XI Commerce IT

▶ Channel subscribe करें