1

I do Arduino-based device with sensors and web interface. I have code in C++ for arduino (hardware part (in Arduino)) and code in Java (software part (on server)). These two codes are relatively independent. Hardware and software part can work without second part.

Now I have one repository with "hw" directory and "sw" directory. I do not like it. Revision of hw and sw parts are together. It is unclear.

What is the best way?

  • Still use 2 directories in one repository?
  • Create two independent repositories?
  • Create one "main" repository and inside this create two submodules http://git-scm.com/docs/git-submodule ?
  • Other solution?
martin
  • 1,707
  • 6
  • 34
  • 62

1 Answers1

1

The submodule approach is the recommended one, as it allows you to track the exact version of the hw and sw repos you are using.

That way, you can reproduce the correct configuration of your project at any point in time in the history of said project.

Plus, as illustrated in "Best approach for handling cloned applications?", you can make a submodule follow a particular branch, making the updates easier to integrate in your main project.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250