Ravindra Bagale · Data Scienceसर्व coursesया course चे lessonsशोधाEnglish

Data Science · मराठी आवृत्ती

27.3 Data work साठी .gitignore

By Ravindra Bagale

या course चे सर्व chapters (py + ch)

हे का शिकायचं?

Secrets, .venv, मोठे CSV, checkpoint folders commit होऊ नयेत.

हे काय आहे?

.venv/, __pycache__/, .ipynb_checkpoints/, data/raw/*, .env — नमुना नियम (policy नुसार).

कसं करायचं?

Step 1. .gitignore तयार.

Step 2. venv ignore.

Step 3. checkpoints ignore.

Step 4. Secret files ignore.

उदाहरणं: copy करा आणि चालवा

उदाहरण A — Starter ignore file.

# Python
__pycache__/
.venv/
venv/

# Jupyter
.ipynb_checkpoints/

# Secrets
.env
.env.*
secrets.json

# Data bulk (keep samples if you want)
data/raw/*.csv
data/raw/*.csv.zip
!data/raw/sample_orders.csv

# Outputs can be rebuilt — optional ignore
# outputs/*.png

उदाहरण B — Check what Git sees.

git status --short

उदाहरण C — Un-ignore a sample.

The !data/raw/sample_orders.csv line re-includes one small file after a folder pattern ignore — useful for classmates.