One of the reasons that people choose to use Git is how easy it is to do branching. Unfortunately, PowerBuilder hasn't implemented it yet. But that doesn't stop you from using this feature if you don't mind taking a few extra steps. This article shows you how you can work on different branches with the help of TortoiseGit.
If you are not familiar with the basic flow of setting up PowerBuilder with Git, please check this article first PowerBuilder 2017 R2 New Feature: Git source control support.
Suppose you are working on the master branch and now need to work on the dev branch
- Close PowerBuilder.
- Stash your changes in master branch using TortoiseGit.
- Switch/Checkout the dev branch.
- You can double click on the pbw file to start PowerBuilder. Make sure you click Refresh to get all objects from the dev into the IDE.
- You can do your development in the IDE and you can also use the Git Commit in the IDE to commit to dev branch.
- When you are ready to submit your commits in dev, you need to use TorotiseGit to push it to the server.
- You can switch back to the master branch using the same method mentioned above.
- Use Stash Pop (if you need to apply the last stash) or Stash List > Stash Apply to restore the previous status of your master branch.
- Restart you PB and do a Refresh and then you can work on the master branch again.