This document provides a practical introduction to Git for OCCT contributors. OCCT development is hosted on GitHub at https://github.com/Open-Cascade-SAS/OCCT.
For experienced Git users, sections 1 and 3 are sufficient to get started. Please also read the Contribution Workflow for the overall process.
The official OCCT Git repository:
https://github.com/Open-Cascade-SAS/OCCT
Clone via HTTPS:
git clone https://github.com/Open-Cascade-SAS/OCCT.git
Or via SSH:
git clone git@github.com:Open-Cascade-SAS/OCCT.git
Configure your identity before creating commits:
On Windows, keep line endings predictable for cross-platform patches:
If you use TortoiseGit or another graphical client, configure the same user name, email address, and SSH client in that tool.
GitHub supports both HTTPS and SSH remotes. HTTPS is usually the simplest option for cloning and pushing through Git Credential Manager. SSH is convenient when you already use SSH keys:
Add the generated public key to your GitHub account, then check access with:
Clone your fork:
Add the upstream repository as a remote:
Always create branches from an up-to-date master:
Use any descriptive name for your branch (e.g., fix-empty-shape-crash, step-ap242-ed4).
Develop your change, following OCCT Coding Rules. Format your code using clang-format with the configuration provided in the repository.
Commit your changes with a meaningful message:
The first line should follow the Group - Summary format (see Contribution Workflow). Provide a detailed description in the commit body if needed.
Push your branch to your fork:
Then create a Pull Request on GitHub:
Open-Cascade-SAS/OCCT/IR and compare to your branchThe CI/CD pipeline runs automatically on every push:
Results appear in the GitHub Actions tab of the PR.
A reviewer examines the changes and provides feedback as PR comments. Address feedback by pushing new commits to the same branch. CI/CD re-runs automatically.
Once approved and all checks pass, a maintainer merges the PR. PRs are typically squashed into a single commit on IR.
Regularly sync your fork with upstream:
If your branch falls behind IR, rebase it:
If conflicts occur, resolve them manually, then:
After rebasing, force-push to your fork:
Note: Do not force-push if others are working on the same branch.
After your PR is merged, delete the local and remote branch:
Regularly prune stale remote tracking branches: