> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/3.0/harness-platform-resources/git-experience/manage-services-using-git-experience.md).

# Manage services using Git Experience

When you create a new Harness service, you can store the service in one of the following ways:

* Inline: Harness stores the service in its platform.
* Remote: the Harness service is stored in Git.

You can set the service as Inline or Remote when the service is created, and then change the service storage method after it is created. Changing the storage method is described in this topic.

The topic explains how to use the Remote option to store your services in your Git platform account.

### Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* Ensure you have a Git repo with at least one branch.​
* Ensure you have a set up a [Harness Git connector](/harness-ai/use-harness-platform/connectors/code-repositories/connect-to-code-repo.md) with a Personal Access Token (PAT) for your Git account.​

### Visual summary <a href="#visual-summary" id="visual-summary"></a>

Here's a quick video of how you can manage services, environments, and infrastructure definitions through Git Experience.

{% embed url="<https://www.youtube.com/watch?v=ZvtyLxmtHTo>" %}

### Create a remote service <a href="#create-a-remote-service" id="create-a-remote-service"></a>

You can create a service at the Harness account, organization, or project level. This topic explains the steps to create a service at the project level. The process is the same for the other levels.

To store a new service in a remote Git repo, do the following:

1. In your Harness account, go to a project.
2. In **Project Settings**, select **Services**. To learn more about creating services, go to [Create Services](/continuous-delivery/use-continuous-delivery/cd-building-blocks/services/create-services.md).
3. Select **New Service**. The **Add Service** settings appear.
4. In **Name**, enter a name for the service.
5. In **How do you want to set up your service**, select **Remote**.
6. In **Git Connector**, select or create a Harness Git connector to the repo where you will store the service.​ For more information, go to [Code Repo Connectors](/harness-platform/3.0/harness-platform-resources/connectors/code-repositories/ref-source-repo-provider.md).
7. In **Repository**, select a repository. If your repository isn't listed, enter its name. Create the repository in Git before entering it in **Select Repository**. Harness does not create the repository for you.
8. In **Git Branch**, select a branch. If your branch isn't listed, enter its name. Create the branch in your repository before entering it in **Git Branch**. Harness does not create the branch for you. Save the service to the default branch on the first save. You can then create different branches in the Harness repo if you want to create different versions of your service.

   Harness Git Experience auto-populates the **YAML Path**. You can change this path and the file name.
9. Select **Save**. You can see the repo details in the new service.
10. Click the YAML path to view your service YAML file in your Git repo.

### Add remote services to a pipeline <a href="#add-remote-services-to-a-pipeline" id="add-remote-services-to-a-pipeline"></a>

Once the remote Harness service is created, you can use it in your CD pipeline. You can add a remote service to a pipeline regardless of whether the pipeline is inline or remote.

The **Deployment Type** of the remote service (Kubernetes, ECS, etc.) must match the **Deployment Type** of the stage where you are adding the service.

To add a remote service to a pipeline, do the following:

1. In your pipeline, go to the CD stage **Service** settings.
2. In **Select Service**, select the remote service.
3. Select the branch for the version of the service you want to use in your pipeline.
4. Select **Apply Selected**.

{% hint style="info" %}
**NOTE**

* When the remote service is linked to the pipeline, the branch of the service is displayed as `__DEFAULT__`. `__DEFAULT__` resolves to the same branch as the pipeline when both the service linked to the pipeline are in the same repository. If the pipeline resides in a different repository, then *DEFAULT* resolved to the main branch of the repository where the linked service resides.

2. If a [remote stage template](/harness-ai/use-harness-platform/templates/create-a-remote-stage-template.md) with a remote service is connected in a remote pipeline and both are in the same repository, the pipeline's branch defaults to the main branch. However, if the service is in a different repository it will not work.
   {% endhint %}

### Change an inline service to a remote service <a href="#change-an-inline-service-to-a-remote-service" id="change-an-inline-service-to-a-remote-service"></a>

You change a service stored from **Inline** to **Remote** and save it in a Git account.

1. Select **Services**.
2. Select **More Options** (⋮).
3. Select **Move to Git**.

The same settings used when creating a remote service appear. Configure the settings just as you would for a new remote service.
