Example

The following example shows how to fork a branch, then upstream your changes. This example uses Fast-CDR v1.0.26, with commit hash 6184f25f. Commit hashes are unique identifiers created for each commit to a project. In the following case, the commit hash represents a base version to work off of.

Prerequisites:

First, fork the Fast-CDR repo:

1. Open the Fast-CDR GitHub Repository.

2. Click the Fork button to fork the Project:


3. Set yourself as the owner, and uncheck Copy Master Branch Only. Then, click Create Fork.

4. You should now be redirected to your fork of Fast CDR! Keep this page open, or be ready to reopen it.

Next, set up your workspace:

1. Open a terminal window. Create a new folder using the mkdir command, then navigate to it using cd:

mkdir qnx_wksp && cd qnx_wksp

2. Go back to your fork's webpage then copy the ssh or https link to your fork:


3. In your terminal, clone the repository to your machine and enter the repository. Then, checkout the commit we mentioned above:

git clone <link you just copied>
cd Fast-CDR
git checkout 6184f25f

4. Create a new branch to work off of:

git branch qnx
git checkout qnx

Your setup is complete! The following steps explain how to port.

Upstreaming once setup is complete:

1. Commit our changes one last time to prepare for upstreaming:

cd qnx_wksp/Fast-CDR
git commit -am 'Last commit prior to upstreaming'

2. Push your changes to GitHub

git push
# or, if this is not yet set up:
git push --set-upstream origin

Now, you can simulate creating a Pull Request to upstream.

3. Open the GitHub repo and navigate to the Pull Requests tab. Hit New Pull Request.

4. Select the upstream repository and original branch, alongside your repository and branch. Here, qnx-ports/Fast-CDR is the repository, and qnx_v2.2.5 is the branch. You can see changes on this page:


5. Finally, hit Create Pull Request and fill out the information.

Page updated: