--- /dev/null
+# This .gitignore is reversed: everything is ignored by default, and versioned
+# files must be un-ignored.
+# To get the complete list of files ignored by git, you can use the following command:
+#
+# [WARNING] This command is aggressive and can delete un-commited work. Be sure
+# to have a backup of your local repository before proceeding.
+#
+# `git rm -r --cached . && git ls-files --others --ignored --exclude-standard`
+#
+
+# Ignore everything
+*
+
+!.gitignore
+# CMake config file
+!CMakeLists.txt
+!MEDCouplingConfig.cmake.in
+!MEDCoupling_version.h.in
+# pre-commit configuration file
+!.pre-commit-config.yaml
+# license file
+!COPYING
+
+# recursively allow subdirectories
+!*/
+
+# autotools related files (obsolete)
+!/adm_local/**
+# documentation
+!/doc/**
+# data for tests and documentation
+!/resources/**
+# source code
+!/src/**
+# scripts related to transition from version 7 to 8 of MEDCoupling (i.e. of SALOME)
+!/v8_work/**