> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Git Version Control Settings

> How to configure Git-based version control for CData Arc configuration tracking and environment management, including per-workspace repositories.

To complete the configuration of the global (application-level) repository, navigate to **Settings > Advanced > Git Version Control**, then click **Configure**. To version an individual workspace in its own repository, see [Workspace Git Version Control Settings](#workspace-git-version-control-settings).

![Git version control configuration pane](https://mintcdn.com/cdata-arc/JuVWSaGlKX7avH_C/26.4/images/settings_git_cloud.png?fit=max\&auto=format\&n=JuVWSaGlKX7avH_C\&q=85\&s=a35221c4c789826d014bfa08f50a2aa1)

Provide the following:

* The URL to your remote Git repository. If you are using SSH, do not enter the HTTPS address here; you must use the SSH address (for example, `git@github.com:username/private-repo.git`). All major Git platforms are supported (such as GitHub, GitLab, Bitbucket, and Azure DevOps).
* Your auth scheme. Once you select an auth scheme, the fields required for configuration appear.
  * HTTPS: The **Username** and **Password** or **Token** to connect to the repository.
  * SSH: The **SSH Private Key** file and **Passphrase** to connect to the repository. See [Authenticating with SSH](#authenticating-with-ssh) for more information.
  * OAuth: Click **Get Access Token** to retrieve the access token that allows you to connect.

After the repository is initialized, you can still edit the remote URL (see [Edit the Remote URL](https://docs.arc.cdata.com/26.4/cloud/en/getting-started/administration/git-version-control.md#edit-the-remote-url)).

When you click **Save**, Arc runs an initialization task. This initialization creates a Git repository inside `AppDirectory`, creates a branch named `settings-before-git-init-<initialization_date>` that contains the configuration that exists at initialization, and stages those configuration files for commit. This ensures that no configurations are lost in the event that the remote repository already has content that would conflict with those settings.

The Arc footer changes to a status bar showing Git metrics and actions such as the current number of local files changed, the current branch, and (for remote repositories) the number of remote commits. For remote repositories, click **Commit and Push** on the toolbar to push the initial commit.

![Git version control footer toolbar](https://mintcdn.com/cdata-arc/d_uxoDpYg8BiVilE/26.4/images/version_control_footer_toolbar.png?fit=max\&auto=format\&n=d_uxoDpYg8BiVilE\&q=85\&s=d59c1b1cf3d5ea75acdc08db5941353f)

## Workspace Git Version Control Settings

A [workspace](https://docs.arc.cdata.com/26.4/cloud/en/flows/workspaces.md) can have its own Git repository, separate from the global repository. To configure it, open the workspace, then click **Settings** in the ellipsis menu. Click the **Git Version Control** tab. See [Global and Workspace Repositories](https://docs.arc.cdata.com/26.4/cloud/en/getting-started/administration/git-version-control.md#global-and-workspace-repositories) for how workspace repositories relate to the global repository.

Configure the following:

* **Enable Git Version Control**: turns on a separate Git repository for this workspace. If the global repository is set up, a warning explains that enabling version control for the workspace removes it from the global repository, so the workspace is tracked only in the repository that you configure. Shared resources that the workspace uses, such as connections, certificates, and profiles, remain in the global repository.
* **Repository URL and authentication**: provide the same repository URL, auth scheme, and credentials that the global repository form requires (HTTPS, SSH, or OAuth). See the settings above and [Authenticating with SSH](#authenticating-with-ssh).

  ![Workspace settings Git Version Control tab with version control enabled](https://mintcdn.com/cdata-arc/d_uxoDpYg8BiVilE/26.4/images/version_control_workspace_settings_enabled_cloud.png?fit=max\&auto=format\&n=d_uxoDpYg8BiVilE\&q=85\&s=ce6abc9585560a707860a5b84ca047b0)

Click **Save** to apply the settings.

> [!NOTE]
>
> Workspace repositories follow a few rules, such as a restriction on the **Default** workspace. See [Global and Workspace Repositories](#global-and-workspace-repositories) for details.
>
> As with the global repository, you can still edit the remote URL after initialization.

## Authenticating with SSH

Follow these steps to authenticate using SSH:

* Run `ls -al ~/.ssh` to check for an existing SSH key.
* If you have an existing key, you can use it. Alternatively, run this command to generate a new SSH public/private key pair: `ssh-keygen -t ed25519 -C "your_email@example.com"`.
* Optionally, add a passphrase to the key for added security.
* Use the **SSH Private Key** field to upload your private key.
* Add the public SSH key to your Git platform.

For more information on how to authenticate with SSH, review your Git platform's documentation.

## Removing a Git Configuration

To remove your global Git version control configuration, click the trashcan icon on the settings panel, then choose a **Git Repository Option**:

* **Leave the underlying repository intact**: Arc disconnects from the repository, but the `.git` folder remains on disk. You can still interact with the repository directly using Git tools on the server.
* **Remove the underlying repository**: Deletes the `.git` folder, fully disabling version control on this installation. Any staged changes are permanently lost.

After removing the configuration, you can set up version control again by clicking **Configure**.

To remove a workspace Git repository, toggle **Enable Git Version Control** off, then click **Save**. You are presented with the same **Git Repository Option** choices as for the global repository, but the results differ for a workspace:

* **Leave the underlying repository intact**: Arc disconnects the workspace from its repository, but the `.git` folder remains. Uncommitted changes stay in that repository. The workspace is not tracked by the global repository, even if you have one.
* **Remove the underlying repository**: Deletes the workspace's `.git` folder. If you have a global repository, uncommitted changes in the workspace are automatically added to it, and the global repository tracks the workspace again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.