Ravindra BagaleCourses & study guides मराठी Track your progress

27. How to Use Git with Jupyter Notebooks for Data Projects

Data Science

27.5 Commits, Remotes and Team Hygiene

Why. “ASDF” commit messages help nobody at 11 pm before a stakeholder call.

What.

  • Small commits; present-tense or clear past messages.
  • git remote optional — GitHub backup when ready.
  • Never force-push secrets “to fix” a leaked key — rotate the key.

How.

Daily habit

  1. git status before you leave the desk.
  2. Stage related files together (notebook + README note).
  3. Write message: what / why in one line.
  4. If using GitHub: push after local commit works.
  5. If a secret slipped in: rotate secret; remove from history with help — do not leave it active.

Worked example A — Good messages.

Add Nashik filter to delivered GMV notebook
Ignore raw csv zips in gitignore
Document fictional data caveat in README

Worked example B — Bad messages.

update
asdf
final
wip wip wip

Worked example C — Who commits what (fictional).

Person Commits
Shraddha Cleaning notebook
Amir Chart notebook + outputs/.gitkeep
Both Review .gitignore before first push

Ravindra Bagale's Tip

Treat a commit message like a note in your calendar: say what changed and why in one line, for example “Add Nashik filter to delivered GMV notebook”. Messages like “update” or “wip” do not help anyone next month, including you. Keep one idea per commit, and run git status before you leave your desk.