Skip to content
learnFRC.org
programmingreference

Git Workflows for FRC Teams

Version control branching strategies, commit discipline, and conflict resolution during build season and competitions.

A structured Git workflow prevents code overwrites, speeds up rollbacks when software faults occur, and keeps parallel development organized.

Branching Strategy: Short-Lived Feature Branches

Section titled “Branching Strategy: Short-Lived Feature Branches”

We recommend a Trunk-Based / Short-Lived Feature Branch workflow:

  1. main Branch: Contains code that is tested and known to run safely on the physical robot. Deploying from main should never cause an unhandled exception or mechanical crash.
  2. Feature Branches: Created for specific tasks:
    • feat/intake-indexer-logic
    • tune/shooter-velocity-gains
    • auto/4-piece-center-subwoofer
  3. Pull Requests (PRs): Require review by at least one other student or mentor before merging into main.

Before your first qualification match, tag the exact commit currently deployed to the roboRIO:

Terminal window
git checkout main
git tag -a comp-event-match-01 -m "Code on robot for Qualification Match 1"
git push origin --tags
Why Tag Matches?

If the robot behaves erratically in Match 4, comparing git diffs between comp-event-match-01 and the current commit immediately reveals which constant or logic change caused the issue.


Never commit build artifacts, cache files, or machine-specific binaries:

# Gradle & WPILib build artifacts
build/
.gradle/
bin/
# IDE files
.idea/
*.iml
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
# AdvantageScope & DataLog logs
*.wpilog
*.dlog

Verified Sources & Standards

Evergreen Standard Verified: Sep 24, 2026