Git - TAMSFormers5212/TAMSformers-Database GitHub Wiki
Git is a distributed workflow solution that allows groups to work together on a code project.
The FRC Docs have an explanation for Git version control and how to get started.
It is recommended that everyone create their own github account if they have not already. The programming captain can then invite everyone to join that year's group.
Typically, when you open the project in vscode, if it was downloaded from github, a source control tab will be available. Once you sign in, this allows you to use git commands and source control through the vscode gui.
It will show you all the changes you have made. Once you are ready to push the changes to the repository, you will need to stage them. Then, you will need to write a commit message. If you do not, the process will just stall and you'll have to close and reopen vscode. Then, you can sync changes to push those to the branch you are working on.
It is a good idea to pull any changes that have been made by someone else or on a different device before you try to push your new changes. Otherwise, a merge conflict will occur resulting in more actions to resolve.
There are already lots of resources for using Git and Github already on the internet. You can check those out for general info on using Git.
These are some FRC specific resources.
2024 was the first time post timeskip where we had >1-2 qualified programmers, and we saw some issues with managing the work split between programming members.
The issue with pushing everything to main is that you end up with basically no version control. It makes it hard to go back and reflect on what features have been added, haven't been added, or are still being worked on. This is compounded with bad commit messages which do not describe what has been changed.
We're still developing our github workflow, so most of this section is going to be just general tips and advice for Git.
Branches allow multiple avenues of development. Generally, you'll want to make a new branch for every new feature. That way there is always a reliable version of the code to fall back to, and you can develop of multiple features at once with several different students working on them. Then, whenever a feature is finished, they can submit a pull request and merge the branch.
[insert how to do this in vscode]
Lets you edit commit messages and group commits together and reduce commit blarf.
Whenever you want to combine two branches together, there may be merge conflicts that occur. You can resolve this by rebasing, updating one and then the other, or merging, selecting which code stays in each conflict.