Indeed, you should not be tracking that file in Git. You should be counting on catkin_make
or catkin_init_workspace
to auto-generate that file.
Moreover, if you are tracking that file in Git it sounds to me like potentially the root of your Git repository is not in the right place. For ROS, nearly all Git repositories contain either a single package/metapackage, or a collection of packages bundled together with a metapackage that depends on all of the packages. An example of the first situation might be usb_cam, where the Git repo is initialized in the package's root directory. For an example of the second situation, the ros_tutorials Git repository has a metapackage called ros_tutorials
that depends on roscpp_tutorials
, rospy_tutorials
and turtlesim
, and the source code for all of those packages is also in the Git repo. Put another way, you should be running git init
in either a package's root directory or in a directory containing a collection of packages. You should not be running git init
in the src/
directory of a workspace.