Our team uses C++ and sinced we have grown from a programming team of 1 to a team of 5, we need to find a program that we can use to share our code with each other. Anyone have a suggestions on what to use?
Use GitHub and fork/push/pull the code for development. They have a great set of tutorials to help learn the process and the give each FIRST team a free private repository.
They’ll give FRC teams more than one private repo if you ask. I know 79 has at least 5.
Github. Though we personally use flash drives.
Our GitHub Settings shows that we were given a free Bronze account, providing 10 free private repositories.
We currently use GitHub as well, but in the past we’ve simply done all of our robot programming on one laptop (with a second laptop serving as a backup). There are disadvantages to that, but it makes sure there’s only one copy of the code.
adding another one for github, but when its very simple code we just use pastebin
Another for github. A bit of a learning curve to get used to it, but the features are super powerful. Also hip and new it’s what all the cool kids use.
One last thing about git is that it allows for access to your complete history even without internet access, which can be very helpful at most competitions – not that we ever have to edit our code at competition
Thanks for all the help!
On our team it seems like every programmer brings their own computer to work on so we will try using Github, the problem we’ve been having with flash drives is that you can’t easily merge codes, does Github merge codes if 2 people are working at once? (anyone have a link to a tutorial on how to use it for FRC?)
Yes, git (the software one uses to publish changes to github and to manage changes made to software locally) is very good at handling merges. See http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Yes, that is one of git (and therefore Github’s) most powerful features. Most code that is used for FRC (java or c++) will be automatically merged very nicely.
Github is also one of the largest hosted source control products used today. It’s a good skill to have (ability to use git) as you will need to use it out in the professional world.
Pull requests are one feature Github has which enable teams to do code review (aka before code enters the main code base, another person has to look over it first). This is a really good practice to get into and Github makes it very easy to do. About pull requests - GitHub Docs
Lastly, Github gives FRC teams a free silver organization (Pricing · Plans for every developer · GitHub). You can request it at Engaged students are the result of using real-world tools - GitHub Education.
We use dropbox. Any programmers, or anyone who might just use the code is invited to a shared dropbox folder. If you download the dropbox program is shows up like any other folder on your device, and you can save just like normal. Everyone will have access to the newest code immediately after its saved on whatever device last worked on it.
What happens if you have 2 programmers working on code at the same time? Does dropbox try to merge your codes? or does it just take the newest one?
Git is probably a really good way to keep your code, even if you are programming yourself. I have a GitHub account and it has saved me a lot of work.
Just yesterday, I had a problem, where I was pushing a small change to my repo in the sky at GitHub. I tried to remove the build folder using the command:
rm -r *build
I forgot “build” and all of a sudden, my command became:
rm -r *
Too bad so sad for the work done. It’s alright though. My change was quite small. Because of that, I just cloned the repo again and redid that change.
It took me about 15 minutes to fix my large mistake.
If I didn’t use GitHub, I would have lost 2 weeks of work! :eek: ::ouch::
Does anyone know of any examples on how to use Github for FRC C++?
My repositories are about 90% C/C++ ;).
Feel free to check out every inch of it
To download a repository,
user@dev~/soft $ git clone <location of repository>
Dropbox overwrites with the newest saved version. Thats why we just keep numbered versions (V1, V1.1, V2, V2.1).
Here are some resources:
Dropbox actually does give you the ability to restore previously saved versions of a file.* But it isn’t really set up for the kind of version control that would be useful for most teams.
Thats why we just keep numbered versions (V1, V1.1, V2, V2.1).
Our “numbered versions” are copies of the project folder with the time and date appended to the name of the folder.
- That came in handy once when I accidentally saved an empty copy of my son’s senior design project. I think he still isn’t aware that it happened.