🌱 Step 1: Create a Feature Branch
Always work on a separate branch, never directly on main/master.
$ git checkout main
$ git pull origin main
$ git checkout -b feature/add-hpo-config
Branch Naming Conventions
feature/ - New functionality (feature/add-optuna-hpo)
fix/ - Bug fixes (fix/reward-calculation)
experiment/ - Experimental changes (experiment/new-architecture)
docs/ - Documentation updates (docs/update-readme)
💾 Step 2: Make Commits
Make small, focused commits with clear messages.
$ git add configs/hpo_config.yaml
$ git add src/hpo_runner.py
$ git add .
$ git commit -m "Add Optuna HPO configuration and runner script"
Good Commit Messages
✅ Do
- "Add learning rate to search space"
- "Fix reward calculation bug"
- "Update README with setup instructions"
❌ Don't
- "fix stuff"
- "WIP"
- "asdfasdf"
📤 Step 3: Push to Remote
Push your branch to GitHub to share with teammates.
$ git push -u origin feature/add-hpo-config
$ git push
Before Pushing
📄 Step 4: Open a Pull Request
Create a PR on GitHub to request merging your changes.
$ gh pr create --title "Add Optuna HPO configuration" --body "..."
PR Description Template
## Summary
Brief description of what this PR does.
## Changes
- Added HPO configuration file
- Implemented Optuna objective function
- Updated README with HPO instructions
## Testing
- [ ] Ran HPO with 5 trials locally
- [ ] Verified results export to CSV
- [ ] Checked TensorBoard logging
## Screenshots (if applicable)
[Add any relevant screenshots]
🔎 Step 5: Code Review
Reviewers examine your code and provide feedback.
Review Types
🛠
Request Changes
Needs modifications
Responding to Feedback
- Address all comments before requesting re-review
- Make new commits to address changes (don't force push)
- Reply to comments explaining your changes
- Be open to suggestions - reviewers help improve code quality
✅ Step 6: Merge
Once approved, merge your PR into main.
$ gh pr merge --squash
Merge Strategies
- Squash and merge - Combines all commits into one (recommended for feature branches)
- Merge commit - Keeps all commits with a merge commit
- Rebase and merge - Replays commits on top of main
After Merging
$ git checkout main
$ git pull origin main
$ git branch -d feature/add-hpo-config