Version Control with GitHub
GitHub version control lets you save, share, and track changes to your C3 AI application. When you connect your application to GitHub, your files are saved in a C3 AI package stored in the repository. Collaborators can access and iterate on those changes, and you can view the full history of who changed what and when.
How GitHub connects to C3 AI
You can connect your application to GitHub at different points in your workflow:
- During application creation: Link to a GitHub repository and package when first creating your application in C3 AI Studio.
- While developing an existing application: Connect to GitHub from the development flow in C3 AI Studio.
- Through Data Fusion: Configure or reconfigure GitHub directly from the Data Fusion interface after your application is running.
Regardless of when you connect, all GitHub settings (repository, branch, path, and credentials) are stored at the environment level. All applications in that environment share the same settings.
GitHub integration at the environment level
In Data Fusion, GitHub integration is configured at the environment level, not per application.
This means:
- When you create a new application within an environment that already has GitHub configured, the application automatically uses the GitHub repository and branch specified at the environment level.
- You cannot configure different GitHub branches for individual applications within the same environment.
- All changes made across applications in that environment are tracked against the same GitHub branch, as defined during environment setup.
To work on a different branch — for feature development or isolated testing — create a new environment configured with the desired branch.
Review your GitHub repository before connecting to C3 AI
Each C3 AI environment uses a single set of GitHub credentials. All updates from that environment save to the same repository path.
After connecting your environment to a GitHub repository, all applications in the environment share the same GitHub setup:
- User credentials
- Repository
- Branch
- Path
If multiple collaborators build applications in the same environment, agree on which branch to save packages to and whose credentials to use for all GitHub updates. Ensure all C3 AI packages are in the same folder.
To find the path for your GitHub connection, identify the folder that contains the C3 AI packages for your application.
For example, if the path to the C3 AI packages in Branch1 are the following:
RepositoryName/Packages/Package1
RepositoryName/Packages/Package2Enter the following when configuring GitHub:
Branch: Branch1
Repository: RepositoryName
Code path: Packages
Package: Package1
For the next application you create on the same environment in C3 AI Studio, you can use either Package1 or Package2 as your Package. All other details remain the same.
Before configuring GitHub for your environment:
- Do not end the Code path with a forward slash (/).
- All changes committed from Data Fusion push directly to the branch. Ensure the branch is safe for direct pushes.
- You cannot revert to previous versions through Data Fusion. To restore an earlier state, create a new C3 AI environment and application.
For more information about GitHub and Git, see GitHub documentation.