Git and versions of TIA projects with AI
A TIA Portal project is stored in binary files, so Git on its own cannot show what has changed in it. TIA MCP exports the project to text and saves it as a version in Git. The AI then tells you what changed between versions in blocks, tags, UDTs and hardware. Plus backups before every write, comparison with the PLC and support for VCI and Multiuser Engineering.
Why Git alone is not enough for a TIA project
Git is a tool for text files. A TIA Portal project, however, consists of the binary files of the project database. If you put it into Git directly, you only see that the files changed – not which block, network or tag. You cannot compare two versions or tell the customer what changed.
That is why TIA MCP first exports the project to text. Every PLC block, UDT and tag table gets its own XML file, the hardware is in JSON. The export is deterministic: timestamps and internal identifiers are removed from the XML, so the diff shows only real changes. A block that disappears from the project also disappears from the export, so the deletion is visible in the history.
D:\Git\Linka\ ├── project.json ├── PLC_1\ │ ├── blocks\Motors\FB_Pump.xml │ ├── blocks\Main.xml │ ├── types\typMotor.xml │ ├── tags\IO.xml │ └── hardware.json └── PLC_2\ …
On top of the export, ordinary Git works: commits, history, branches and push to your company server. The change report turns the XML differences into a readable form – interface, networks as pseudo-logic or SCL, titles, and safety blocks separately.
Git only changes the export files, not the project in TIA Portal. Switching a branch therefore does not change the project, and nothing is loaded back from the export automatically. Backups before writing restore individual objects; a TIA Portal archive covers the whole project.
What TIA MCP can do for versions and changes
You give instructions in plain language and the AI picks the right tool. The right-hand column shows their names for those who want to know more.
| Task | How it works | Tools |
|---|---|---|
| Save a version to Git | Exports the project to text and commits it with a message. Creates the repository on first use. | tia_git_committia_export_project_to_text |
| What changed since the last commit | A fresh export and the difference to the last commit – a file summary or the full diff. | tia_git_diff |
| Change report | Readable changes between two versions or against the current state: blocks (interface, networks, titles), safety blocks separately, UDTs, tags and hardware. Saves Markdown. | tia_change_report |
| Branches, history and server | Status, history, branches, checkout, merge, tags, push and pull. Push first shows a preview of the commits, pull is fast-forward only. | tia_git |
| Backups before writing | Before every AI write the object is backed up. You can view the backup and restore the object with one command. Old backups are cleaned up with a preview. | tia_list_snapshotstia_read_snapshottia_restore_snapshottia_prune_snapshots |
| Content fingerprints | TIA Portal fingerprints do not change on compiling or saving, only with content, and distinguish a code change from a comment change. From TIA Portal V19. | tia_fingerprints |
| Is this program in the PLC? | Offline software checksums – the CPU shows the same ones online. Comparison of the offline program with the PLC or PLCSIM without writing. | tia_plc_checksumstia_online_fingerprinttia_compare_online |
| Comparing PLCs and projects | The programs of two PLCs, a PLC against another project or archive (opened read-only) and the difference between two blocks. | tia_compare_plc_softwaretia_compare_devicestia_compare_blocks |
| VCI (Version Control Interface) | A TIA Portal workspace in the Git repository folder, export of PLC objects to files, status and synchronisation in both directions. | tia_list_vci_workspacestia_vci_workspacetia_vci_exporttia_vci_statustia_vci_sync |
| Multiuser Engineering | Servers and server projects, local sessions, marking objects before editing, conflicts and check-in with a comment. | tia_mu_serverstia_mu_create_sessiontia_mu_open_sessiontia_mu_markingstia_mu_marktia_mu_commit |
| Project history | Creation, migration, upgrade and bulk imports with timestamps, the products used and which of them are missing on this PC. | tia_project_history |
| Exports and archive | Export of the whole project to JSON and XML, blocks as SIMATIC SD documents (from V20) and a project archive for backup or handover. | tia_dump_alltia_export_documentstia_project_archive |
How to work with Git on a TIA project
A typical procedure. You give the AI each step in one sentence, or you do it on the Versions and changes page in the web GUI.
First version
You specify the repository folder and the AI makes the first commit: exporting the project to text and creating the repository.
Working on the project
You or the AI do the programming. Every AI write has a backup and an audit entry.
What changed
Before committing you have the diff or the change report shown to you.
Commit
The version is saved with a description of what changed and why.
Branches and server
A branch for the change, push to the company server after a commit preview, pull fast-forward only.
Report for the customer
A change report between releases in Markdown for the handover documentation or release notes.
Backups, Git, VCI, Multiuser or archive?
They are not mutually exclusive. Each approach solves something different and TIA MCP can work with all of them.
| Approach | What it is for |
|---|---|
| Backups before writing | A step back after an AI write. Created automatically, per object, on your PC. |
| Git with the text export | Version history, comparison, change report and sharing via a server. |
| VCI | If you already use the Version Control Interface in TIA Portal: objects as files synchronised with the project. |
| Multiuser Engineering | Several programmers working on one project at the same time via a TIA Portal server. |
| Project archive | The complete project for backup or handover to the customer. |
The Versions and changes page in the web GUI
Since version 2.18 the TIA MCP web interface has a Versions and changes page. You can do everything above there by clicking, without writing a prompt.
Backups
A list of backups with a filter, backup content (XML, JSON or SCL), download, object restore and cleanup of old backups with a preview.
Change report
Two versions (commit, branch, tag or the current state), a summary of changes per device and saving as Markdown.
Git
Status, commit history, commit with project export, a coloured diff since the last commit, branches, push with preview and pull.
Project history
Events from TIA Portal, the products used and what is missing on this PC.
VCI
An overview of workspaces and the status of mapped objects: which differ between the project and the files.
Safe Git operations
The AI works with Git only within limits that cannot delete history or overwrite colleagues' work on the server:
- Never force push, reset --hard, clean or rebase.
- Push sends only the current branch and only after the commit preview is confirmed.
- Pull is fast-forward only. Diverged branches are left alone and a merge is recommended.
- Merging branches without automatic conflict resolution: on a conflict it is rolled back, the conflicting files are listed and the repository stays clean.
- Checkout, merge and pull refuse uncommitted export changes – commit first.
- Server login via a credential helper or SSH key. Git never asks for a password.
- TIA MCP refuses a repository whose settings could run a foreign program.
Example prompts for the AI
You write in plain language. Replace paths and the names of PLCs and blocks with your own.
Save the current project state to Git in D:\Git\Line with the message “New conveyor alarms”.
What has changed in the project since the last commit?
Write a change report between tag v1.2 and the current state and save it as Markdown.
Create a branch filling-change and when we are done, show me what would be pushed to the server.
Is the program in PLC_1 the same as in the project? Compare offline and online without writing.
Save the block fingerprints of PLC_1 as a baseline and after the edits tell me where the code changed and where only comments did.
What a person has to check
Git and backups give you an overview and a way back. The decision what gets downloaded to the PLC remains yours.
- Commit message. The AI suggests it, but you know why the change was made.
- Conflicts. On a conflict the merge is rolled back. A person decides how to combine the work of two people.
- Scope of the export. The text export contains PLC blocks, UDTs and tag tables and a hardware overview. HMI screens are not included; back up the whole project with an archive.
- VCI synchronisation into the project. It changes the project. Run it deliberately; in read-only mode it is not executed.
- Checksums. A match tells you this program is in the PLC. It does not tell you the program is correct.
TIA project documentation with AI
FAQ about Git and versions of TIA projects
Can a TIA Portal project be versioned in Git?
Directly only as binary files, in which Git cannot show what changed. With TIA MCP a text export of the project goes into Git: blocks, UDTs, tag tables and hardware. Differences between versions are then visible per block and network.
Do I need Git on the computer?
Yes, Git must be installed and available in PATH, for example Git for Windows. To push to a server you need access via a credential helper or SSH key.
Do Git operations change my TIA project?
No. The export only reads the project and Git commands only change the repository with the export. Switching a branch therefore does not change the project in TIA Portal.
How do I undo a change made by the AI?
Before every write the object is backed up. You restore the backup with one command or on the Versions and changes page in the web GUI. If an existing object cannot be backed up, the write is not carried out.
What is the difference between Git and Multiuser Engineering?
Multiuser Engineering is a TIA Portal function for several people working on one project at the same time via a server. Git with the text export is for version history and comparison. TIA MCP can work with both.
Does TIA MCP support VCI (Version Control Interface)?
Yes. It creates a workspace, for example in the Git repository folder, maps PLC objects into it, shows their status and synchronises in both directions. Synchronising into the project is a write and is not carried out in read-only mode.
How do I find out whether the PLC runs the version from the project?
You compare the software checksums from the project with the values the CPU shows online. The offline/online comparison shows what differs and writes nothing to the PLC.
Which TIA Portal versions?
TIA Portal V17 to V21 on Windows. Block content fingerprints are available from V19, SIMATIC SD documents from V20 and block metrics in the checksums in V21.
How much does it cost?
The Git and versioning tools are part of TIA MCP. A PRO licence costs €295 per year per computer, excluding VAT, and you can try TIA MCP free for the first 7 days.
Siemens, SIMATIC, TIA Portal, WinCC and S7 are trademarks of Siemens AG. TIA MCP is an independent product of Benešl Automation and not a Siemens product; it works with TIA Portal through the official Openness interface.