Ask Your Question

Revision history [back]

In our repository, we have a .gitignore file with the following contents:

.cproject
.project
.pydevproject
cmake_install.cmake
build/
bin/
lib/
msg_gen/
srv_gen/

(The first three lines are only relevant if you are using Eclipse.) By placing this file in the top-level directory of the repository, git will ignore all those files/folders even in all subdirectories.

This way, I only need a separate .gitignore file in a package directory to catch some special cases. One not-so-special "special case" is when you have an action definition (e.g., JointMovement in the package katana). In that case, I have the following .gitignore:

msg/JointMovementActionFeedback.msg
msg/JointMovementActionGoal.msg
msg/JointMovementAction.msg
msg/JointMovementActionResult.msg
msg/JointMovementFeedback.msg
msg/JointMovementGoal.msg
msg/JointMovementResult.msg
src/katana/
msg/lisp/

Unfortunately, I have not found a decent way yet to include these patterns into the global .gitignore.