Workspace setup
Like any other project, create a workspace on your computer, clone the repository you just forked or are working off of, and create a new branch of the repository to work in.
Before you can do this though, it's important to determine what version of the source code you want to make your changes to. You'll create most branches off of the latest commit (default in git), or via the latest stable version. Most GitLab and GitHub repositories either have a separate branch or tag of the latest stable version.
# Create your workspace
mkdir ~/path/to/your/workspace
cd ~/path/to/your/workspace
# Clone the fork you make
git clone <link to the fork>
cd <fork folder>
# (Optional) Checkout the version/branch you want to work off of
git checkout <branch/commit/tag name>
# Create a new branch for your changes
git branch <any name here, i.e. qnx-<version>>
Now you can get to work! The other sections of this chapter focus on updating code to be QNX compatible.
Choosing a base branch
There are two common choices when you determine a base branch to work off of:
The development branch's latest commit.
The latest stable release (either on its own branch or via a commit/tag).
When choosing the latest stable release, you guarantee that the version you are working off of works and is in use. However, changes made to this branch are not often incorporated into future releases - thus, any QNX compatibility will be immediate but temporary.
When working form the development branch, you have no guarantee that you're using a working project, but any changes you make will be incorporated into any future releases when they release. Compatibility won't be immediate but will persist.
So, how do you get around this? Typically, you'd choose the release branch, make sure the changes work, and submit them. Then, merge or rebase those changes onto the main branch if possible and submit that as well. This process is covered in the next section.