
Mage Pro
Unlock seamless version control and effortless deployments with Mage Pro! Check out this guide to experience a more intuitive, user-friendly way to manage and deploy your code.
Open source
Demo
Setup

Set Git directory
The Git directory is the local folder that will be linked to your remote repository.Authentication
You will be able to authenticate with GitHub by default, but if you need to authenticate with GitHub Enterprise (GHE) or other providers, you will need to follow the steps below. You can authenticate with multiple git providers if you need to. Mage will attempt to use the oauth provider based on the URL of the remote. When creating the OAuth app for GHE, BitBucket, GitLab, you will need to set the authorized callback URL tohttp(s)://<your-mage-url>/oauth.
Authenticate with GitHub or GHE
Authenticate with GitHub or GHE
Register Mage in GitHub
Update environment variables
- GHE_HOSTNAME: the hostname of your GitHub instance. If you’re using non-enterprise GitHub or GitHub Enterprise Cloud, you should set this to
github.com - GHE_CLIENT_ID: the client id you retrieved in the previous step
- GHE_CLIENT_SECRET: the client secret you retrieved in the previous step
Authenticate with GitHub
Authenticate with BitBucket
Authenticate with BitBucket
Add Mage as an OAuth consumer
Update environment variables
- BITBUCKET_OAUTH_KEY: the key you retrieved in the previous step
- BITBUCKET_OAUTH_SECRET: the secret you retrieved in the previous step
Authenticate Mage with Bitbucket
Authenticate with GitLab
Authenticate with GitLab
read_user, write_repository, and api scopes from GitLab in order
to perform the necessary git actions.Add Mage Oauth application
Update environment variables
- GITLAB_CLIENT_ID: the application ID you retrieved in the previous step
- GITLAB_CLIENT_SECRET: the secret you retrieved in the previous step
- GITLAB_HOST (optional): hostname for your GitLab instance. Defaults to
https://gitlab.com
Authenticate Mage with GitLab
Authenticate with Azure DevOps
Authenticate with Azure DevOps
Enable Active Directory integration
Update environment variables
Authenticate Mage with Azure DevOps

Add remote
Enter a name for your new remote. For the remote URL, you must use thehttps version of the
GitHub repository (as opposed to the SSH version).
For example, the remote URL for Mage is https://github.com/mage-ai/mage-ai.git.
Note that a remote added via HTTPS/SSH authentication will not work— only a remote in the format above is accepted.
Once you fill in both input text fields, click the button labeled Create new remote.
Actions
Clone remote repository
- Under the Actions dropdown, select the option labeled Clone.
- Under the Remote dropdown, select the name of the remote you want to clone from (e.g. origin).
Pull remote branch
- Under the Actions dropdown, select the option labeled Pull.
- Under the Remote dropdown, select the name of the remote you want to pull from (e.g. origin).
- Under the Branch dropdown, select the name of the branch you want to pull from the remote you chose from the previous step.
Branches

Switch branch
- Under the dropdown labeled Current branch, select the name of the branch you want to change to.
- After selecting a branch, the current branch will be updated to what you selected.
Create branch
- Type in the name of the new branch in the text input field.
- Click the button labeled + Create new branch.
Merge branch
- Under the Base branch dropdown, select the name of the branch you want to merge into your current branch.
- Under the Action dropdown, select the option labeled Merge.
- Type a commit message for the merge action.
- Click the button labeled Merge.
Rebase branch
- Under the Base branch dropdown, select the name of the branch you want to rebase into your current branch.
- Under the Action dropdown, select the option labeled Rebase.
- Type a commit message for the rebase action.
- Click the button labeled Rebase.
Delete branch
- Under the Base branch dropdown, select the name of the branch you want to delete.
- Under the Action dropdown, select the option labeled Delete.
- Click the button labeled Delete.
- Confirm the popup dialog box.
Files

Add files
- On the left side under Not staged, check the boxes next to the files you want to add.
- Once you’re done selecting the files, click the button labeled Add files.
- The selected files will be staged.
Checkout files
- On the left side under Not staged, check the boxes next to the files you want to checkout.
- Once you’re done selecting the files, click the button labeled Checkout files.
- Confirm the popup dialog box.
- All changes to the selected files will be undone.
Reset files
- On the right side under Staged files, check the boxes next to the files you want to reset.
- Once you’re done selecting the files, click the button labeled Reset files.
- The selected files will be unstaged.
Commit
- Enter a commit message.
- Click the button labeled Commit N files with message.
Push

Push local changes
- Under the Remote dropdown, select the name of the remote you want to push to (e.g. origin).
- Under the Branch dropdown, select the name of the branch you want to push.
- Click the button labeled Push [remote] [branch].
Create pull request
- Under the Repository dropdown, select the name of the repository you want to create a pull request for.
- Under the Base branch dropdown, select the name of the branch you want your pull request to compare against (e.g. main).
- Under the Compare branch dropdown, select the name of the branch you want your pull request to be for (e.g. feature branch).
- Type the title of the pull request in the text input field labeled Title.
- Type the description of the pull request in the text input field labeled Description.