CONTRIBUTING
How to Contribute
This project welcomes third-party code via GitHub pull requests.
You are welcome to propose and discuss enhancements using project issues.
Branching Policy: The
master
branch is considered stable, at all times. Thedevelopment
branch is the one where all contributions must be merged before being promoted to master. If you plan to propose a patch, please commit into thedevelopment
branch, or its own feature branch.
We recommend enabling Github Actions on your fork of librealsense
to make sure the changes compile on all platforms and pass unit-tests.
In addition, please run pr_check.sh
and api_check.sh
under scripts
directory. These scripts verify compliance with project’s standards:
Every example / source file must refer to LICENSE
Every example / source file must include correct copyright notice
For indentation we are using spaces and not tabs
Line-endings must be Unix and not DOS style
Every API header file must be able to compile as the first included header (no implicit dependencies)
Most common issues can be automatically resolved by running ./pr_check.sh --fix
Please familirize yourself with the Apache License 2.0 before contributing.
Step-by-Step
Make sure you have
git
andcmake
installed on your system. On Windows we recommend using Git Extensions for git bash.Run
git clone https://github.com/IntelRealSense/librealsense.git
andcd librealsense
To align with latest status of the development branch, run:
git fetch origin
git checkout development
git reset --hard origin/development
git checkout -b name_of_your_contribution
to create a dedicated branchMake your changes to the local repository
Make sure your local git user is updated, or run
git config --global user.email "email@example.com"
andgit config --global user.user "user"
to set it up. This is the user & email that will appear in GitHub history.git add -p
to select the changes you wish to addgit commit -m "Description of the change"
Make sure you have a GitHub user and fork librealsense
git remote add fork https://github.com/username/librealsense.git
with your GitHubusername
git fetch fork
git push fork
to pushname_of_your_contribution
branch to your forkGo to your fork on GitHub at
https://github.com/username/librealsense
Click the
New pull request
buttonFor
base
combo-box selectdevelopment
, since you want to submit a PR to that branchFor
compare
combo-box selectname_of_your_contribution
with your commitReview your changes and click
Create pull request
Wait for all automated checks to pass
The PR will be approved / rejected after review from the team and the community
To continue to new change, goto step 3. To return to your PR (in order to make more changes):
git stash
git checkout name_of_your_contribution
Repeat items 5-8 from the previous list
git push fork
The pull request will be automatically updated
Comment about the Wrappers
For example, when adding new value to
rs2_option
enum, please also add it to:The list of Matlab options under
wrappers/matlab/option.m
The list of options for Unreal Engine integration
The list of options in the C# wrapper -
wrappers/csharp/Intel.RealSense/Types/Enums/Option.cs
The list of Java options used for Android integration -
wrappers/android/librealsense/src/main/java/com/intel/realsense/librealsense/Option.java
The list of options in the python wrapper
Once all are updated Github Actions will give clear indication that each of the wrappers is still passing compilation.