Version Control Best Practices

intermediate20 min

Practices that help the team

Good habits make history readable and merges less painful.

Commit messages

  • Use imperative mood: Add auto path, not Added
  • First line: short summary (under ~50 characters when you can)
  • Body: why the change matters, what you tested
  • Reference an issue number if your team uses them
git commit -m "Add autonomous scoring sequence for alliance hub"
git commit -m "Fix drivetrain calibration issue in teleop mode"

Branches

Use names like feature/autonomous-scoring or fix/drivetrain-calibration. One topic per branch. Delete branches after merge.

Robotics team habits

  • Commit when a logical chunk works (not only at end of meeting)
  • Pull before you start a session
  • PR or review before merging to main
  • Note hardware or config changes in the commit message or PR text

Repo layout

Add a .gitignore for build output and IDE files. Keep secrets (keys, tokens) out of Git; use environment variables or local config. A short README helps new students clone and build.

Further Reading Resources