github_setup_guide
github_setup_guide
Quick Reference Guide for Version Control Setup & Daily Workflow
Prerequisites Checklist
Keep the GitHub page open - you'll need the repository URL
# Python __pycache__/ *.py[cod] *$py.class *.so .Python env/ venv/ ENV/ env.bak/
venv.bak/ # Jupyter Notebook .ipynb_checkpoints */.ipynb_checkpoints/* # Data files
(add specific paths as needed) data/raw/* data/processed/* *.csv *.xlsx *.parquet
!data/.gitkeep # Models and outputs models/*.pkl models/*.joblib outputs/ results/ #
Docker .docker/ # Environment files .env .env.local # IDE .vscode/ .idea/ *.swp *.swo
*~ # OS .DS_Store Thumbs.db # Logs logs/ *.log
Create README.md
# My Data Science Project ## Overview Brief description of what this project does ##
Setup Instructions ### Prerequisites - Docker - Docker Compose - Git ### Quick Start
```bash git clone https://github.com/yourusername/my-ds-project.git cd my-ds-project
docker-compose up -d ``` Access Jupyter Lab at http://localhost:8888 ## Project
Structure ``` ├── data/ │ ├── raw/ # Original data │ ├── processed/ # Cleaned data │
└── external/ # External datasets ├── notebooks/ # Jupyter notebooks ├── src/ # Source
code ├── tests/ # Unit tests ├── docker-compose.yml ├── Dockerfile └──
requirements.txt ``` ## Usage [Add specific instructions for your project] ##
Contributing [Add contribution guidelines] ## License [Add license information]
git config --global user.name "Your Name" git config --global user.email
"your.email@example.com"
git add . git status # Review what will be committed git commit -m "Initial commit:
Docker DS project setup - Add Dockerfile with Python 3.11 and DS libraries - Add
docker-compose.yml for easy container management - Add requirements.txt with core DS
packages - Add comprehensive .gitignore for DS projects - Add project structure and
README"
Write descriptive commit messages that explain the 'what' and 'why'
Push to GitHub
After this, you can use just git push for future pushes
Phase 3: PyCharm Git Integration
9
You'll see Git options appear in the VCS menu and toolbar
10
11
Keep 'main' for stable releases, use 'develop' for active development
Commands:
git checkout develop git pull origin develop # ... work on your code ... git add
. git commit -m "Add: [description]" git push origin develop
🔀 Feature Development
Create feature branch → Develop → Test → Merge back to develop
Commands:
git checkout develop git checkout -b feature/data-preprocessing # ... develop
feature ... git add . git commit -m "Implement data preprocessing pipeline" git
checkout develop git merge feature/data-preprocessing git push origin develop git
branch -d feature/data-preprocessing
📊 Experiment Tracking
Create experiment branches for different approaches
Commands:
Release Preparation
When ready for a release, merge develop to main
Commands:
git checkout main git pull origin main git merge develop git tag -a v1.0.0 -m
"Release version 1.0.0" git push origin main --tags
# Install Git LFS (one time setup) git lfs install # Track large files git lfs
track "*.csv" git lfs track "*.parquet" git lfs track "models/*.pkl" # Add
.gitattributes git add .gitattributes
🔍 Regular Maintenance
Keep your repository clean and organized
Pro Tip: Always pull before you push, and commit often with meaningful messages!