GitHub is an easy choice for most FRC teams. Options are available, like GitLab or BitBucket, and there are many others.
Most FRC teams will be longer lived than one season. It is recommended that teams create an Organization in GitHub to host repositories for multiple years.
Once an organization is created it is very important to have multiple people as administrators on that Organization. As team members come and go, having multiple admins will ensure that access to the Organization is never lost.
Create an empty repository in your organization.
The TorontoCodingCollective provides a GyroDrive example shows:
how to use the Command framework to drive a robot
how to log values to the Shuffleboard Dashboard
how to implement command logging to add log information to the DriverStation logs
how to implement selectors on the Shuffleboard dashboard
select an Auto
select a drive mode, tank or arcade drive
Driving along a gyro heading
Code formatter to allow collaboration settings to be shared
Push the code to your team's code repository
the VS Code extension GitLens provides a tool to push the code to an alternate repo.
choose Source Control ... Pull, Push -> Push to...
choose the new repository and push the example