Add a workspace to Git
If your local PowerBuilder workspace has not been added to the
Git source control system before, you can add the entire workspace to
Git from the PowerBuilder IDE. To add a workspace to Git, you do it in
two steps:
Step 1: You upload the workspace to the repository on your local
computer.
Step 2: You push the workspace from the local repository to the
remote repository on the Git source control server.
Below are the complete steps.
To add a PowerBuilder workspace to the Git source control
system:
-
Right-click the workspace in the System Tree and select Add
to Source Control from the pop-up menu. -
In the Add to Source Control dialog box, select Git as the
source control provider for the current workspace and click
OK. -
In the Author Information dialog box, input the author name
and author email.After clicking OK, the Add to Source Control dialog box
displays listing all the files for the workspace that are not
currently under source control. You cannot add files that are
already under source control.A ws_objects sub-folder is automatically created under the
workspace, for managing the source code file of the PowerBuilder
objects such as .srw (for window), .srm (for menu), .sru (for user
object), .srd (for DataWindow), etc. ws_objects must be added to
source code, in order to manage the source code at object
level. -
In the Add to Source Control dialog box, select the files
and folders (especially ws_objects) and click OK.PowerBuilder adds the selected files and folders to the
repository on your local computer. After the file or folder is
added to the local repository, the object in the PowerBuilder
System Tree will be marked with a green dot () in front of it, indicating that its source
code file on the local computer is in sync with the file on the
local repository. Now you can proceed to push the objects from the
local repository to the remote repository on the Git source
control server. -
Right-click the workspace in the System Tree and select Git
Push from the pop-up menu. -
In the Git Login dialog box, input the information required
by the source control system. If the login information has been
input before, they will be filled in automatically.Input the URL of the Git server and the repository for the
workspace. Make sure the repository with the same name exists on
the server and the repository is empty before you push the
files.The name of the current workspace is automatically
displayed.Type in your user name and password for the Git source
control system.Click Test Connection to make sure connection is successful
and then click OK.If using proxy server
If using the proxy server, configure the proxy server IP
address and port number in the PB.ini file (by default, the INI
file is located in
C:Users<username>appdatalocalappeonpowerbuilder
17.0 in Windows 7 or later). Copy the following section to the
INI file and set the appropriate value for the proxy
server:[SourceControlProxy]
Url=192.0.0.88
Port=80
Username=
Password=
Timeout=10
PowerBuilder pushes the selected objects to the Git source
control system.
“Reference was not fast-forwardable” error when pushing to
Bitbucket
When adding the workspace to the Bitbucket server using “Git
Push”, you may come across the “Reference was not fast-forwardable”
error, if the repository on the Bitbucket server is created with a
readme (the “Include a README” option set to “Yes, …”). To resolve
this error, you can first execute a “Git Pull” (to synchronize the
server repository with the local repository) and then execute “Git
Push” again.