27. How to Use Git with Jupyter Notebooks for Data Projects
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 remoteoptional — GitHub backup when ready.- Never force-push secrets “to fix” a leaked key — rotate the key.
How.
Daily habit
git statusbefore you leave the desk.- Stage related files together (notebook + README note).
- Write message: what / why in one line.
- If using GitHub: push after local commit works.
- 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
Message = calendar note. “update” = future you la gaali.