Source Control
for TIA Portal Projects
A full Git-based version control system embedded in T-IA Connect. Export your project as readable text files, commit changes, view diffs, manage branches, and sync with remotes — directly from the UI or via MCP tools.
TIA Portal Projects Are Version Control Nightmares
Binary files, no diffs, no merge — the worst-case scenario for source control
Opaque Binary Format
TIA Portal projects are proprietary binary files. Git sees them as blobs — no line-by-line diffs, no meaningful merge, no way to see what actually changed between two versions.
Copy-Paste Versioning
Engineers version projects by copying folders: Project_v1, Project_v2, Project_v2_John_modified. Disk space explodes, nobody knows which version is current, and merging is impossible.
No Change Visibility
Someone changed a function block last week. What exactly did they change? Which network? Which instruction? Without text diffs, you can't tell without opening both versions side by side in TIA Portal.
No Collaboration Workflow
Two engineers can't work on the same project simultaneously with any confidence. No branches, no merge capability, no pull requests. One overwrites the other's work.
How VCS in T-IA Connect Works
Export → Git → diff/branch/merge, with automatic XML normalization
Automatic Project Export
T-IA Connect exports all project elements as readable text files: blocks (OB, FB, FC, DB) as SimaticML XML, tag tables, UDTs, watch tables as XML, and hardware configuration as AML.
XML Normalization
TIA Portal can reorder XML attributes between exports, causing false diffs. The built-in XmlNormalizer sorts attributes deterministically, so diffs show only real changes.
Embedded Git (LibGit2Sharp)
No external Git installation required. T-IA Connect uses LibGit2Sharp for a fully embedded Git implementation. Init, commit, branch, diff, merge, push, pull — all built in.
Full Branch Management
Create branches for variants or experiments. Work on a feature branch, test it, then merge back to main. Same workflow software teams use, now for PLC projects.
Remote Sync (Push/Pull)
Add a remote repository (GitHub, GitLab, Gitea, Azure DevOps) and push/pull changes. Share project history across the team with standard Git infrastructure.
Desktop UI Sidebar
A VCS sidebar in the desktop application shows repo status, modified files, and lets you commit directly from the UI. No command line needed for everyday operations.
Typical Version Control Workflow
From project change to tracked, diffable history
1. Initialize Repository
Run vcs_init to create a Git repository in .tia-connect/source/. This is done once per project. All subsequent exports go into this directory.
2. Commit Changes
After making changes in TIA Portal, run vcs_commit. T-IA Connect exports the entire project, stages the files, and creates a Git commit with your message.
3. View Diffs & History
Use vcs_diff to see exactly what changed — which XML elements were added, modified, or removed. Use vcs_log to browse commit history with messages and timestamps.
4. Branch, Merge & Restore
Create branches for experiments (vcs_branch_create), merge them back (vcs_merge), or restore a specific file from a previous commit (vcs_restore).
What Gets Exported
Every project element becomes a readable, diffable text file
Program Blocks
OB, FB, FC, DB — exported as SimaticML XML. Each block is a separate file in the blocks/ directory. Full network structure, instructions, and comments preserved.
Tag Tables
PLC tags exported as structured XML in the tags/ directory. Names, data types, addresses, and comments — all version-controlled.
UDTs & Watch Tables
User-Defined Types in udts/ and watch tables in watch/. Complete project data types tracked alongside the program logic.
Hardware Configuration
Network topology, CPU configuration, and I/O modules exported as AML (AutomationML) in hardware/. Track hardware changes alongside software changes.
VCS Tools Available
Accessible via MCP, Copilot, REST API, and the desktop UI
vcs_init / vcs_commit / vcs_status
Initialize the repository, commit the current project state with a message, and check which files have been modified, added, or deleted since the last commit.
vcs_log / vcs_diff
Browse commit history with messages and timestamps. View text diffs between commits or between the working state and the last commit.
vcs_branch_* / vcs_merge
Create, list, checkout, and delete branches. Merge branches back together. Full Git branching workflow for PLC projects.
vcs_remote_* / vcs_push / vcs_pull
Add, list, and remove remote repositories. Push commits to a remote and pull changes from the team. Standard Git remote workflow.
vcs_restore / vcs_config
Restore a file from a previous commit. Configure Git user name and email. Project-level settings for the embedded Git repository.
Frequently Asked Questions
How is this different from TIA Portal's built-in project versioning?
TIA Portal's versioning works at the full project level — binary snapshots. T-IA Connect's VCS exports individual elements as text files, giving you line-by-line diffs, branching, merging, and the ability to see exactly what changed in each block. They complement each other.
Can I push to GitHub/GitLab?
Yes. Add a remote with vcs_remote_add and use vcs_push/vcs_pull to sync. The exported text files work perfectly with any Git hosting platform. Your PLC project history lives alongside your other repositories.
Does the restore actually import back into TIA Portal?
vcs_restore retrieves the file content from a previous commit. Full reimport into TIA Portal is under development (there's an encoding issue with UTF-16 on some block types). For now, restore gives you the exact source content to manually reimport.
Do I need Git installed on my machine?
No. T-IA Connect embeds Git via LibGit2Sharp — a native .NET implementation of Git. No external Git installation, no PATH configuration, no command line. Everything works through T-IA Connect's UI and tools.