tinycodinglm / code /bad005.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 12)
3c88a0f verified
|
Raw History Blame Contribute Delete
2.07 kB
deepseek-harness trace
System You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing c...

You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies.

User

What are bad Git and version control habits?

Assistant

Commit Habits:

bash
# Bad commit messages
git commit -m "fix"
git commit -m "stuff"
git commit -m "WIP"
git commit -m "asdfasdf"

# Good commit messages
git commit -m "fix: handle null user in login flow"
git commit -m "feat: add password reset endpoint"
git commit -m "refactor: extract validation logic"

Branching Mistakes:

  • Direct commits to main
  • Long-lived feature branches (merge hell)
  • Not pulling before pushing
  • Force pushing shared branches

Bad Practices:

bash
# Bad: committing generated files
git add .
git commit -m "add everything"

# Bad: committing secrets
git add .env
git commit -m "add config"

# Bad: giant commits
# 50 files changed, 10,000 insertions

Good Practices:

bash
# Use .gitignore
node_modules/
.env
*.pyc
__pycache__/

# Small, focused commits
git add src/auth.py
git commit -m "fix: validate email format"

# Use .gitignore-template
# Use PRs/code review
# Write meaningful PR descriptions

Merge Conflicts:

  • Don't ignore conflicts
  • Understand both sides before resolving
  • Test after resolving
  • Communicate with team

Tagging Releases:

bash
# Bad: no tags
# Good: semantic versioning
git tag -a v1.0.0 -m "Release 1.0.0"
git tag -a v1.1.0 -m "Add user settings"