Skip to content

Github Steps for Contribution

Wei, Jimmy T edited this page Mar 10, 2023 · 1 revision

Getting the latest oneAPI code samples

If you want to obtain code samples that run on the latest released version of the Intel® oneAPI Toolkits, using the git command, type:

 git clone https://github.com/oneapi-src/oneAPI-samples.git

If you already have the git repo cloned but need to update the local branch, type:

 git pull master

Making a contribution to the repository

All code sample contributions must go into the development branch where they will be reviewed. The master branch contains only code samples that work with the latest released version of the Intel® oneAPI Toolkits.

Before submitting a new pull request, you must fork the oneAPI-samples repository. To fork the repo, click on the Fork icon and then select Create a new fork. It will take a few seconds for the fork to be created. If you previously forked the repo, continue here.



When creating a new fork, make sure that the Copy the master branch only checkbox is unchecked before the Create fork button is clicked.



If you have an existing fork but do not have a development branch, create one by selecting the oneapi-src/oneAPI-samples development branch in the dropdown as the branch source.



Once your fork has been created, go to the Settings icon and select Branches. Change the default branch to development in the dropdown and click on the Update button.



To create a new branch in your fork, make sure the development branch is selected from the dropdown and enter the name of your branch in the text field.



In the example above, my_branch is the name of the branch to be created. To clone the repo and checkout the branch that you just created, type:

 git clone -b <your branch name> https://github.com/<your GitHub username>/<your repo name>.git

Once you are ready to commit your changes to your repo, type the following:

git add .
git commit -s -m "<insert commit reason here>"
git push origin

Creating a new pull request

To submit a new pull request, click on the Pull requests icon and then the New pull request button.



Ensure that the development branch is selected for the oneapi-src/oneAPI-samples base repository and that your branch name is selected as the compare branch in the head repository. If you are able to merge, click on Create pull request.


Follow the instructions in the text field and enter a description of your changes and click on the Create pull request button.


That's it! Congratulations. You have now created a new pull request.

Clone this wiki locally