Lesson 5 of 60 · python
Version Control with Git & GitHub
Duration: 15 minutes
Version Control with Git
A solid data science workflow includes versioning your code and notebooks.
Basic Git workflow
git init # create a repo
git add . # stage all changes
git commit -m "Initial commit"
Branching
git checkout -b feature/eda # create and switch to a new branch
Pushing to GitHub
git remote add origin https://github.com/yourname/ds-project.git
git push -u origin main
.gitignore for notebooks
# .gitignore
.ipynb_checkpoints/
*.pyc
__pycache__/
.env