BlogUpgrades & versions

PowerBuilder and Git: Source Control That Works

Yes — PowerBuilder speaks Git natively (since 2017 R2), and since PowerBuilder 2025 it is genuinely good. The whole game is one fact: a .PBL is binary, so you make Git version the exported source, not the library. Here is the working 2026 setup — what to commit, how to branch, how to build in CI — as a reference you can apply today, not a longread.

Aug 2026

PowerBuilder has spoken Git natively since 2017 R2, and since PowerBuilder 2025 it is genuinely good. Everything below follows from one fact: a .PBL is a binary library, so Git can't diff or merge it. The whole workflow is about making Git version the exported source objects instead. Here is the working 2026 setup — as a reference, not a longread.

A binary PBL cannot be merged by Git; PowerBuilder exports each object to a text .sr* file that Git can diff and mergeBINARY LIBRARY · .PBLapp.pbl10011010 1101…Git sees one blob —can't diff or merge it.PB EXPORTSEACH OBJECTSOURCE-CONTROLLED OBJECTSw_main.srwd_customer.srdn_app.sruapp.pbgGit diffs & merges each file.
The core idea: never version the binary .PBL — version the per-object .sr* text files PowerBuilder exports from it.

What changed — most horror stories predate PB 2025

If you last tried Git with PowerBuilder years ago, the calculus has changed twice: 2022 stopped you committing binary PBLs, and 2025 made the source itself merge-friendly.

PowerBuilder source-control milestones from 2017 R2 to 2025 R22017 R2Native Git2019 R3Branches in IDE2022No PBL commits2025Solution · merge fix2025 R2Fetch · Rebase
2022 killed the “commit-the-binary-PBL” class of pain; 2025 removed the code-reordering that caused phantom conflicts and dropped PBNative / SCC / MSSCCI entirely.
ReleaseWhat you get for source control
2017 R2Native Git/SVN in the IDE; objects exported to text (source-controlled objects)
2019 R3Create/switch branches inside the IDE; selectable encoding
2022PBLs generated from source on Get — stop committing binaries; token auth
2025Solution format (each PBL a folder of .sr*); phantom-conflict fix; PBNative & MSSCCI removed
2025 R2Git Fetch & Rebase in-IDE; branch shown in status bar

The 2026 setup

1. Commit source, ignore binaries

What to commit to Git and what to ignore in a PowerBuilder repositoryCOMMIT — the source of truth*.srw .srd .sru …every object as text*.pbgwhich object lives in which PBL*.pbproj *.pbslnproject / solution filesimages, *.pbrvia a Git client (not the IDE)IGNORE — rebuildable artifacts*.pbd *.exe *.dllcompiled output.pb/ build/machine code & build folder_BackupFiles/IDE backups*.user.optper-user IDE state
Commit source and structure; ignore anything PowerBuilder can rebuild. In the 2025 Solution format the .pbl is a folder of .sr* files — commit it. (Pre-2025 Workspace model: commit ws_objects/ and ignore the binary *.pbl.)

Ready-to-paste .gitignore for the PB 2025 Solution format:

# Compiled output & machine code — never commit
*.pbd
*.exe
*.dll
.pb/
build/
_BackupFiles/
_UpgradeFiles/

# Per-user IDE state
*.user.opt

Pre-2025 (Workspace model): the .pbl is a binary file, not a folder — add *.pbl to the list above and commit the ws_objects/ source directory instead. On Get, tick “generate PBLs from source” so no binary is ever needed in the repo.

2. Know the sync cycle (this is where changes “vanish”)

PowerBuilder + Git sync cycle: save exports source, pull regenerates the PBL, then a manual refresh and full build are requiredSave in IDEexports .sr*Commit + Pushto your remotePullrebuilds PBLRefresh + buildmanual — don't skip
PowerBuilder exports source only on save and imports it only on Pull. After a pull or a branch switch you must Refresh and do a full build — skip it and a teammate's change simply won't appear.

3. Branch without the DataWindow merge hell

  • Short-lived feature branches. Objects are coarse (a whole window/DataWindow is one file), so long parallel branches on popular objects guarantee conflicts.
  • Git has no per-object lock. Enforce one editor per DataWindow by coordination — a claim list where people mark what they're editing.
  • Drive branch / switch / merge from the IDE, then Refresh after every switch and Git Pull the target before merging.
  • On PB 2025 R2, prefer Rebase for a linear history without Pull's extra merge commit.

4. Resolve conflicts safely

  1. Conflicted object shows a ! in the tree → right-click → Edit Conflicts (with Compare / Show Log).
  2. Resolve, then confirm the object compiles — a bad merge of an .srd/.srw can crash the IDE.
  3. After a multi-object merge, run a full build / 3-pass regenerate so cross-references recompile.
  4. .pbg out of sync? Open it as text, add the missing object entries, then Refresh.

5. Build in CI — no IDE, no license on the agent

PBAutoBuild is the modern path: it pulls from Git, regenerates PBLs and builds/deploys from a JSON config you export from the IDE — on a bare agent.

:: encrypt the Git password once
pbautobuild250.exe /p yourGitPassword

:: build + deploy from a JSON config exported by the IDE
pbautobuild250.exe /f build\app.json /l deploy.log /le error.log

Appeon ships a working reference (the PowerBuilder-AutoBuild-Sales-Example repo). On older stacks the classic chain still works: OrcaScript with importonly + refresh target 3pass to build the PBLs from source, then PBC to produce the EXE.

6. Onboard the right way

Use the IDE's “Connect to Workspace”, never a plain git clone. PowerBuilder stores the repo binding in the Windows registry keyed to the workspace path — a raw clone, a copied folder, or moving the folder later all silently disable Git integration. Same reason CI agents need OrcaScript/PBAutoBuild, not a clone-and-build.

What Git still won't do (be honest about it)

CapabilityGitSVN
Branching & mergingStrongWorkable
Lock an object to stop parallel DataWindow editsNo native lockExclusive lock
Distributed / offline workYesNo
Native in PowerBuilder since 2017 R2YesYes
  • No per-object lock in Git— for a handful of hot, constantly-edited DataWindows, SVN's exclusive lock can prevent more pain than Git's branching saves. Both are native, so it's a real choice.
  • The IDE is not a full Git client. Repo browsing, rich logs and some merges still send you to TortoiseGit alongside it.
  • Moving to the 2025 Solution format can cost Git history. The on-disk restructure often means a fresh repo — decide up front whether to keep messy same-repo history or start clean.

Bottom line. Target PowerBuilder 2025 / 2025 R2 with the Solution format, commit the exported source (not the PBL), coordinate DataWindow edits because Git can't lock, and build in CI with PBAutoBuild. Do that and PowerBuilder under Git is a normal, boring, working setup — which is exactly what you want from source control.

Frequently asked

Can PowerBuilder use Git natively?

Yes. Native Git (and SVN) has been built into the IDE since PowerBuilder 2017 R2 — commit, push, pull and branch without any MSSCCI bridge. PowerBuilder 2025 R2 added Git Fetch and Rebase and shows the active branch in the status bar.

Should I commit the .PBL files to Git?

It depends on the format. In the PowerBuilder 2025 Solution format the .pbl is a folder of individual text source files — commit it. In the older Workspace model the .pbl is a binary library — do not commit it; commit the ws_objects source folder instead and let PowerBuilder regenerate the PBLs on Get. Never commit compiled .pbd, .exe or .dll.

Why are DataWindow merges so painful, and how do we avoid them?

A DataWindow exports to one dense source file that generic three-way merge tools can't interpret. PowerBuilder 2025 removed the code-block reordering that caused most phantom conflicts, but genuine overlapping edits still can't be auto-merged. The fix is process: one editor per DataWindow, coordinate who owns what, keep objects small, and use SVN's exclusive lock for the few hottest objects if you need hard prevention.

Is PowerBuilder + Git still as painful as people say?

Most of the horror stories predate PowerBuilder 2022 and 2025. 2022 ended committing binary PBLs; 2025 fixed phantom merge conflicts and moved to a VCS-native Solution format; 2025 R2 added Fetch and Rebase. On current PowerBuilder it is a normal, workable Git flow — with two lasting limits: no per-object lock, and the IDE is not a full Git client.

PowerBuilder notes, now and then

New writing on upgrades, databases and modernization — a few times a month, nothing more.