.gitignore for an OCaml project

Stefan Alfbo - Jul 23 '23 - - Dev Community

As a newcomer to the language OCaml I would like to know how a typical (or initial) git ignore file should look like.

I only found one resource, OCamlverse, that mention what to ignore in an OCaml project.

The summary is that we want to ignore following directories in the .gitignore-file.

# Ignore the artifacts from building the project
_build/
# Ignore the _opam directory which is acts as
# a cache for the opam
_opam/
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .