I have a catkin workspace with the following structure:
catkin_ws/
├── build
├── devel
└── src
As expected all my code/packages are in the src directory but the base directory, catkin_ws, is being tracked by GIT.
My problem is that each time I have to execute catkin_make, git status reports back modifications to build and devel directories - which I want ignored.
I created a .gitignore file under catkin_ws with the following content:
# exclude everything except directory foo/bar
build/
devel/*
But, I still get the same modified files in build and devel as shown below:
> On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)
modified: .gitignore
modified: build/CMakeCache.txt
modified: build/CMakeFiles/Makefile.cmake
modified: build/CMakeFiles/Makefile2
modified: build/CMakeFiles/TargetDirectories.txt
modified: build/CTestTestfile.cmake
modified: build/Makefile
modified: build/catkin_generated/generate_cached_setup.py
modified: build/catkin_generated/installspace/_setup_util.py
modified: build/catkin_generated/order_packages.cmake
modified: build/catkin_generated/order_packages.py
modified: build/catkin_generated/setup_cached.sh
modified: build/catkin_generated/stamps/Project/_setup_util.py.stamp
modified: build/catkin_make.cache
modified: build/cmake_install.cmake
modified: devel/_setup_util.py
Untracked files: (use "git add <file>..." to include in what will be committed)
src/beginner_tutorial/
src/my-robot/
src/oreilly/
Can anyone help, please?
Originally posted by sisko on ROS Answers with karma: 247 on 2017-12-09
Post score: 0
Original comments
Comment by jayess on 2017-12-09:
If you have a collection of related packages you can create a metapackage that houses those related packages and put that under version control instead.