Managing CODESYS 4 Projects in a Version Control System
A key feature of CODESYS 4 is the text-based, UTF-8 encoded data storage: each object is stored in its own readable file. This allows projects and workspaces to be managed directly with a version control system such as Git, SVN, or Mercurial – with traceable comparison views (diffs), code reviews, and integration with CI/CD pipelines.
Deciding on whether or not a file should be under version control depends on if it is part of the source code of the project. Temporary data, binary files such as build artifacts, and user-specific settings are not included and by default should not be managed with a version control system.
The following files are managed in a version control system:
Path/Pattern | Type | Applies to | Semantics | Description |
|---|---|---|---|---|
| Folder | CODESYS 4 | Exclude | Location for compile and reference contexts (SideCar) Located in the |
| Folder | CODESYS 4 | Exclude | Location for resolved, compiled libraries Located at the top level of the project ( Can be committed if necessary, as long as the binaries are unproblematic in the version control system; however, the folder is ignored by default. |
| Folder | CODESYS 4 | Exclude | Location for temporary files, for example |
| Folder | CODESYS 4 | Exclude | Location of the generated offline boot application If no path is specified, then in each case in the |
| Folder | CODESYS 4 | Exclude | Location for user-specific workspace settings and user preferences Located parallel to the workspace file Can be committed by the user, but by default not version-controlled |
| Folder | CODESYS 4 | Exclude | Location for user-specific project settings and user preferences Located at the top level of the project Can be committed if necessary, but by default not version-controlled |
| File | Git | Include | Defines which files are managed by Git |
| File | Git | Include | General Git rules such as line breaks |
Tip
Unlike the libraries, the .devDesc cache is set to version control by default because it consists of text files.
.gitignore file# .gitignore file for CODESYS 4 projects .compileContexts/ /.library-cache/ .intermediate/ .bootapp/ *.fbsws.user/ /.user/ !.gitignore !.gitattributes