Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🚀 Week 9 – Deep Learning, Deploy & Career  ·  Day 53

Day 53: Git, GitHub & Portfolio

⏱ 2 hours📶 Beginner🎯 100% self-study
Day 53 / 60

✅ Today you will learn

  • Why every data team uses Git
  • The everyday commands: init, add, commit, push
  • Branches, pull requests and merge
  • Project structure and .gitignore for data
  • A README and portfolio that get interviews

🏢 In the real world

A recruiter has 200 applications and 30 seconds for each. “Knows pandas” on a CV proves nothing; a GitHub link with four clean projects, readable READMEs and charts proves everything. Git is also how your future team will share and review your code every day.

Git in one picture

Working folder (edit files)git add → staging areagit commit → local historygit push → GitHub (online)
Every change is saved as a snapshot you can go back to

One-time 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

A 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
⚠️ Never commit secrets or big data

Passwords, API keys and .env files must be in .gitignore – bots scan GitHub for leaked keys within minutes. Large or private CSVs should not be committed either; share a small sample and explain how to get the full data.

The everyday 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
CommandMeaning
git statusShow changed / new files
git diffShow line-by-line changes
git add filePut a change in the next snapshot
git commit -m "msg"Save the snapshot with a message
git log --onelineList snapshots
git restore fileUndo uncommitted changes to a file
git pullGet the latest from GitHub
git pushSend your commits to GitHub
💡 Good commit messages

Write what and why in the present tense: “Add festive-season feature to churn model”, not “changes” or “final_final_v3”. Commit small, logical steps.

Branches and 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. 1Create a branch for one task
  2. 2Commit your work there
  3. 3Open a pull request
  4. 4Review and discuss
  5. 5Merge into main
How teams collaborate safely

A README recruiters read

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
❓
The questionOne line: what business problem did you solve?
📊
Findings with numbersA table of 3–5 insights and recommendations.
🖼️
One great chartShow, don’t tell – the chart sells the project.
▶️
How to runrequirements.txt and two commands.
Four parts of a strong README

Your portfolio plan (from this course)

ProjectShowsCourse days
BazaarKart sales EDApandas, cleaning, EDA, storytelling15–19, 24
HR / sales SQL warehouseSQL joins, CTEs, window functions32–35
A/B test of new checkoutStatistics, experiment design29–31
Telecom churn prediction + appML pipeline, metrics, deployment56–60
🧠 Make it yours

Recruiters have seen the Titanic and Iris datasets a thousand times. Add your own question, a second dataset from data.gov.in or Kaggle (Indian data stands out), and your own recommendations.

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 unlocked today

✔ Use Git for daily version control✔ Push projects to GitHub and use branches/PRs✔ Structure data projects with .gitignore✔ Write portfolio READMEs that sell your work

Practice tasks

🏋️ Practice – do it yourself

Task 1: Create a GitHub account (if needed), push the bazaarkart-sales-eda folder and pin the repository on your profile.
Task 2: Make a branch, change one chart colour, open a pull request to yourself and merge it.
Task 3: Write a README for your SQL project (Day 35) using the four-part structure.

Quick quiz

🧠 Quick Quiz – test yourself

1. Which command saves a snapshot locally?
add stages, commit saves, push uploads.
2. What belongs in .gitignore?
Secrets and bulky files stay out.
3. A pull request is used to…
Code review on GitHub.
4. git switch -c new-branch…
-c = create.
5. The most important part of a portfolio README is…
Recruiters read the top first.

Interview corner

💼 Interview Corner

How do you version-control a data-science project?

Git for code, notebooks and small sample data; .gitignore for secrets and large data; requirements.txt for packages; data and models stored in cloud storage or tools like DVC; branches and pull requests for collaboration.

Walk me through one project on your GitHub.

Start with the business question, the data, your two or three key steps, the main result with a number, and what you would do next. Keep it under two minutes and have the README open.

Summary

  • add → commit → push; status and log tell you where you are.
  • Branches + pull requests = safe teamwork.
  • Clean structure, .gitignore for secrets/data, requirements.txt.
  • Four strong projects with business-first READMEs = your portfolio.
➡️ Next

Day 54: resume, LinkedIn and job search – turn your projects into interview calls.

Frequently Asked Questions

Should I upload notebooks or .py files?
Both: notebooks to tell the story with outputs, .py modules for reusable code. Clear outputs of huge cells before committing.
I committed a password by mistake. What now?
Change the password/API key immediately (assume it is leaked), then remove it from history with GitHub’s guidance or git filter-repo, and add the file to .gitignore.
← Data Science (60 Days)
🔗

Share this topic with a friend

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

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

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

Next topicDay 54: Resume, LinkedIn & Job Search Your progress: 53 / 60 (88%) · Lesson 54 / 60 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free