How do teams use Github?

After looking at a few released repositories of other teams, I was confused on how teams use Github. To those using it, obviously, do you create many different do you create a new branch and then compile it to the master, then upload or copy-paste it into whatever platform you’re using to test it? (If there is a way to correctly use Github for coding, would someone be willing to share, I’m a little new to it and it seems I may be missing out on the robot coding aspect meshing with Github)

1 Like

First of all, a clarification: I believe you intend to be asking about Git, not necessarily GitHub. Git is the well-known version control system that actually manages and tracks your files; GitHub is just a “remote” that works with Git. Bitbucket and GitLab are some other popular remotes for Git.


Now, back to your main inquiry:

First of all, there is no fundamental difference between using Git for robotics programming and any other sort of programming. Just be aware that you may be missing out on much of the utility of Git if the files you wish for Git to track are not simply standard text files (as is the case with EasyC and VCS programs).

As such, I would recommend you simply focus on learning the basics of Git first rather than immediately trying to apply it to robotics. In my opinion, a great way to do that would be by simply reading the first two chapters of the (freely available) Pro Git book. Chapter 3 (branching) would be a worthwhile addition too once you get the hang of the basics.

Just take your time and follow along with the examples on your own computer. Do not be afraid of the terminal and CLI either. They are great tools for establishing a strong foundational understanding of Git, even though many often move on to graphical tools (such as GitKraken or IDE integrations) for larger and more complex projects.

6 Likes

My team was using GitHub since the end of the 2017-2018 season and it really helped out with In The Zone as we were the underdogs and GitHub took away the headache of finding the most recent code to use. I would definitely recommend using it, especially the command terminal variation (Git Bash) as opposed to the desktop application (GitHub for Desktop).

To learn Git, there’s a free course on CodeAcademy about 2 hours long and it covers the key commands.

To use it, you’d have your programmer or team lead create an acc and a repo on github. Then create branches as necessary, merge them when necessary, and iron out the differences. If it helps to visualize it, here’s a picture: Github%20visual

I was the black master branch, green was the programmer, and blue is the other engineer. All three had branches on their PCs and when a set of changes was finalized, they made a merge request and I accepted it. What merge did is it took the obsolete files on GitHub and replaced them with more advanced files from their branch.

Now, the Vex Coding Studio is awesome and all but git can’t tell the difference between the .vcs files. So we wrote an unpack/repack program in python so that git replaces the text files that make up the Vex Coding Studio file. In the end, all one had to do after a merge is bring his local copy up to date and repack the .vcs file (though it may have been automatically replaced during every push).

This may sound complicated but taking a course about git should help you out.

The repo: https://github.com/DwightEisenhower/SHS-Robotics
Team: 87654A

2 Likes

There is no one correct way to handle branching with git, but many teams find the git flow (https://nvie.com/posts/a-successful-git-branching-model/) methodology to work quite well. You can see some examples of this workflow in action in the PROS and OkapiLib. If you only have a couple of programmers on your team then this approach may be overly complicated, but going for a very structured approach is often a good way to start out on the right foot.

2 Likes

Thanks that really did help!