ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A few of the Q&As I linked in my comment state that it's not recommended to version complete workspaces. If you want to distribute sets of packages, put them in a single repository, or use a tool like wstool to clone them all with a single command.

All of that is preferable over versioning workspaces, as there are literally no advantages over putting related packages into a single repository. The src space is just an empty directory (the CMakeLists.txt in there (if using catkin_make) is a link, and is machine and ROS version specific), and it doesn't matter whether you have sub directories in catkin_ws/src containing packages, or whether the package directories are in catkin_ws/src directly.

in this case I would like to just have a repo for my workspace, because it is just tutorial code that is not reusable.

I don't understand how this is a rationale for wanting to version an entire src space.

Now I'm less sure about devel, because the files contain paths that are specific to my system.

To make it explicit: no top-level directories from a Catkin workspace should be versioned directly (so neither src, nor devel, build or install). Only sub directories of the src space would make sense.

If you absolutely must, you could add an empty src directory as the root of your repository and place your packages in there. As you shouldn't version the CMakeLists.txt link there (see earlier comment), it will just be a directory named src. That doesn't make it a Catkin source space though.