We have integrated support for the .gitignore file in PowerBuilder IDE, allowing you to specify which files or directories should be ignored by Git. This prevents unnecessary files (such as temporary files, compiled files, or log files) from being added to version control.
The IDE supports pattern matching using wildcard characters like *, ?, [], !. /, and \, enabling you to create flexible and precise rules for ignoring files and directories. For more information on pattern matching, refer to the Git Ignore Documentation.
Please note the following when using .gitignore with PowerBuilder IDE:
-
The following folders will be ignored automatically by PowerBuilder IDE: ".pb", "build", "ws_objects", "_BackupFiles", and "_UpgradeFiles". If you want to ignore any other files or folders, you can create and configure the .gitignore file, in the same way as you can in other tools such as TortoiseGit.
-
You can create and edit the .gitignore file using a text editor. Once configured, PowerBuilder IDE will automatically identify and prevent the ignored files from appearing in the list of files to be committed to Git.
-
After setting to ignore or not ignore a file in the .gitignore file, you need to manually refresh the PowerBuilder IDE so that the object status icon in the system tree will be refreshed. For example, after setting an object to be ignored in .gitignore, you manually refresh the IDE, and the object will no longer display the status icon (
). After canceling the ignore, you manually refresh the IDE, and the object will display the icon again.
-
When adding a workspace/solution to Git for the first time using "Add to Source Control" in PowerBuilder IDE, all files (except those automatically ignored as listed above) under the workspace/solution directory will be added to the version control. The .gitignore file will not take effect until after version control is successfully added (that is, after the .git sub-folder is created).
-
If the object has been tracked in version control, setting to ignore it in .gitignore is not effective (same for TortoiseGit). If you want to stop tracking an object that is currently tracked, you can use the third-party tool like TortoiseGit, execute the right-click menu "Delete (keep local)" on the object and then submit it. (It is NOT recommended to use "Delete and add to gitignore list" menu which will delete the local file.)