.gitignore pour ROS
36 règles d’exclusion pour ROS, prêtes à copier dans votre dépôt.
Gitignore patterns for ROS
Le .gitignore complet pour ROS
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:30:04 UTC
# Technologies: ROS
### ROS ###
# Build output directory
build/
devel/
# Eclipse output directory
bin/
logs/
# Library directory
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py
build_isolated/
devel_isolated/
*.cfgc
/cfg/cpp/
/cfg/*.py
*.dox
*.wikidoc
# Eclipse project file
.project
# Eclipse C/C++ project
.cproject
# CMake user settings
CMakeLists.txt.user
srv/_*.py
*.pcd
*.pyc
qtcreator-*
# User-specific settings
*.user
/planning/cfg
/planning/docs
/planning/src
# Emacs backup files
*~
# *
.
CATKIN_IGNORE
Ce que ces règles ROS ignorent vraiment
Chaque motif ci-dessous, et pourquoi il a sa place dans votre .gitignore.
General
| Motif | Ce qu’il ignore |
|---|---|
build/ |
Build output directory |
devel/ |
General |
bin/ |
Eclipse output directory |
logs/ |
General |
lib/ |
Library directory |
msg_gen/ |
General |
srv_gen/ |
General |
msg/*Action.msg |
General |
msg/*ActionFeedback.msg |
General |
msg/*ActionGoal.msg |
General |
msg/*ActionResult.msg |
General |
msg/*Feedback.msg |
General |
msg/*Goal.msg |
General |
msg/*Result.msg |
General |
msg/_*.py |
General |
build_isolated/ |
General |
devel_isolated/ |
General |
Generated by dynamic reconfigure
| Motif | Ce qu’il ignore |
|---|---|
*.cfgc |
Generated by dynamic reconfigure |
/cfg/cpp/ |
Generated by dynamic reconfigure |
/cfg/*.py |
Generated by dynamic reconfigure |
Ignore generated docs
| Motif | Ce qu’il ignore |
|---|---|
*.dox |
Ignore generated docs |
*.wikidoc |
Ignore generated docs |
.project |
Eclipse project file |
.cproject |
Eclipse C/C++ project |
CMakeLists.txt.user |
CMake user settings |
srv/_*.py |
Ignore generated docs |
*.pcd |
Ignore generated docs |
*.pyc |
Ignore generated docs |
qtcreator-* |
Ignore generated docs |
*.user |
User-specific settings |
/planning/cfg |
Ignore generated docs |
/planning/docs |
Ignore generated docs |
/planning/src |
Ignore generated docs |
*~ |
Emacs backup files |
Emacs
| Motif | Ce qu’il ignore |
|---|---|
. |
* |
Catkin custom files
| Motif | Ce qu’il ignore |
|---|---|
CATKIN_IGNORE |
Catkin custom files |
Comment utiliser ce .gitignore pour ROS
- Copiez les règles ROS ci-dessus, ou téléchargez directement le fichier.
- Créez un fichier nommé .gitignore à la racine de votre dépôt Git et collez-y les règles.
- Si certains de ces fichiers sont déjà suivis, lancez git rm -r --cached . puis recommitez — Git n’applique les règles d’exclusion qu’aux fichiers non suivis.
- Commitez le .gitignore pour que toute l’équipe partage les mêmes règles.