Announcement

Collapse
No announcement yet.

Recommendations for using GIT on our team's code and on the SDK

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recommendations for using GIT on our team's code and on the SDK

    I am looking for recommendations for using GIT on both our team's code and the SDK. Last year we just downloaded the SDK. It was not under version control. We did have our team code under version control (GIT and GITHUB repo). Our team code was located inside the SDK directory structure (FtcRobotController\src\main\java\org\tullyfirst\F TC8863). I'm just starting to look at this year's setup. V2.2 of the SDK has a teamcode area. I have not spent much time on it but it looks like the recommendation is to put our team's code in there. We are using last year's code as starting point so it will be under version control by default when it gets moved there. However, I am really tempted to clone the SDK and have it under version control. I'm not an expert in GIT. But it seems like having the SDK tree under version control and our teamcode area, which is under the SDK tree, and using a separate version control, will cause problems. Is anyone got both the SDK and their code under version control? Is it a good thing to have the SDK under version control? Is there anyway to have the team code outside of the SDK tree but still able reference and build properly?

    Thanks, Glenn Ball Coach FTC8863

  • #2
    There are many ways to do it. Our team cloned the ftc_app tree then duplicated the tree to our own with all kinds of renaming. Then we merged our old code into TeamCode. The downside of it is that if FIRST release a new version, we can pull it to our ftc_app tree but we have to manually merge the changes to our duplicated tree. On the bright side, because of the new structure, it is quite easy to merge. We just blasted off the <root>\doc, <root>\FtcRobotController and the <root>\libs folders and replaced them with a copy from the ftc_app tree.
    Another way to do it is instead of cloning, you can fork the ftc_app tree so when FIRST came out with a new release you can just merge the changes to your branch.

    Comment


    • #3
      I don't feel like I have good answers either.
      I'd like to keep our TeamCode stuff under version control, too.
      The approach I have in mind is:
      -use github to fork ftc_app into our team's private repository
      -clone, pull, commit, push, etc from the forked github repository
      -merge when necessary, but never accept changes to TeamCode directory contents without due consideration.
      Nota bene - we're not _actually_ doing this yet; I would welcome well-written and tested instructions, be it from another team or from HQ.
      Thanks,
      Martin Haeberli
      (de-)Mentor, FTC 7593, TigerBots

      Comment


      • #4
        I'm surprised nobody mentioned Git subtrees and/or submodules. If you keep the TeamCode folder as a submodule you can have a git tree inside a git tree. Once I got the hang of it I didn't really have any problems (except for one that inherently cannot occur with the FTC SDK).
        FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
        Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

        Comment


        • #5
          Originally posted by hexafraction View Post
          I'm surprised nobody mentioned Git subtrees and/or submodules. If you keep the TeamCode folder as a submodule you can have a git tree inside a git tree. Once I got the hang of it I didn't really have any problems (except for one that inherently cannot occur with the FTC SDK).
          I thought about that but I am not well verse in Git to say how to do it. If you know how, please share.

          Comment


          • #6
            I don't recall the exact commands I used but https://git-scm.com/docs/git-submodule and/or http://blogs.atlassian.com/2013/05/a...e-git-subtree/ as a starting point. Note that submodule and subtree are separate features with their own benefits/drawbacks/workflow.
            FTC6460 mentor (software+computer vision+electronics), FPGA enthusiast. In favor of allowing custom electronics on FTC bots.
            Co-founder of ##ftc live chat for FTC programming--currently you may need to join and wait some time for help--volunteer basis only.

            Comment

            Working...
            X