Overview
Mage Pro makes version control and Git integration effortless for data engineers and machine learning practitioners. By connecting directly to GitHub, you can manage your codebase, collaborate with your team, and deploy pipelines seamlessly across multiple environments. With built-in deployment stages and rollback capabilities, Mage Pro ensures your workflows are efficient, secure, and reliable.
How it works
Mage Pro integrates with GitHub using OAuth tokens, enabling you to sync your repository directly within the platform. You can configure deployment stages for different environments (Development, Testing, Staging, Canary, Production) and use standard Git commands in the terminal to manage branches, commits, and pushes. Once your code is ready, you can deploy it to production or roll back to previous versions if necessary.
Why it matters
Version control and Git integration in Mage Pro provide significant benefits:
Collaboration: Work seamlessly with your team using Git workflows.
Efficiency: Streamline deployments with pre-configured stages.
Reliability: Maintain a complete history of changes and roll back when needed.
Security: Authenticate securely with OAuth tokens for GitHub access.
Step-by-Step Guide
1. Syncing to a GitHub Repository
Connect Your Repository

Navigate to Deployments in the left-hand menu.
Click Setup connection to start syncing with your GitHub repository.
Follow these steps:
Set the directory as your user code path (e.g.,
/home/src/default_repo
).Click Connect next to the GitHub connection.
Sign in with your GitHub credentials.
Select your GitHub organization from the dropdown list.
Choose the repository you want to sync.
Select the branch (e.g.,
main
ormaster
).Click Next step to deployment stage.
2. Configuring Deployment Stages
Add Deployment Stages
Click Add stage in the deployment interface.
Configure each stage:
Select the environment type (Development, Testing, Staging, Canary, or Production).
Specify the branch name (e.g.,
main
ormaster
).Add the target directory (e.g.,
/home/src/default_repo
).Provide an optional description for clarity.
Repeat these steps for additional stages as needed.
Click Deployment triggers once all stages are configured.
3. Using Git Commands in Mage Pro Terminal
Common Commands
Create and switch branches:
Check status:
Stage changes:
Commit changes:
Push changes:
(Uploads the commits from the local
<branch-name>
to the corresponding remote branch on GitHub, making the changes available to collaborators.)
Troubleshooting
Ensure you are working in the correct folder:
/home/src/<Your user code path>
.Configure global settings for username and email if needed:
4. Merging Pull Requests
Push your code changes to the appropriate branch on GitHub.
Open a pull request on GitHub and merge it into the main branch.
5. Deploying Code
Deploy Code
Navigate back to Deployments in Mage Pro.
Click the Deploy button to deploy the current version of your pipeline.
Rollback Code
If necessary, click the Rollback button to revert to a previous version of your pipeline.
Mage Pro’s version control and Git integration ensure that managing data pipelines is simple, secure, and collaborative—helping you focus on building impactful solutions without worrying about deployment complexities!
Your AI data engineer