> 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-ai/use-harness-platform/git-experience/move-inline-entities-to-git.md).

# Move inline entities to Git

Convert existing inline entities to remote and save them in Git

You can move your inline pipelines and input sets to Git. Release Orchestration processes, activities, and process inputs support the same Move to Git action.

### What you will learn from this topic <a href="#what-you-will-learn-from-this-topic" id="what-you-will-learn-from-this-topic"></a>

* How to [move an inline pipeline](#move-inline-pipeline) and its input sets to Git.
* How to [move an inline Release Orchestration process](#move-inline-process) to Git.
* How to [move an inline Release Orchestration activity](#move-inline-activity) to Git.
* How to [move an inline Release Orchestration process input](#move-inline-process-input) to Git.

Moving inline entities like pipelines to a Git repository can provide several benefits, including:

* Version control: By storing the pipelines in a Git repository, you can easily track changes and roll back if necessary.
* Collaboration: Multiple people can work on pipelines at the same time. This makes it easy to review and merge changes.
* Reusability: You can pull the pipelines from the Git repository and use it in different projects or environments.
* Compliance: Storing pipelines in a Git repository can help with compliance and auditing.
* Flexibility: The pipelines can be run from different environments by using a CI/CD pipeline.
* Security: Only authorized users can access them.

{% hint style="warning" %}
When you move an inline pipeline to Git, the pipeline's associated entities aren't automatically moved to a Git repository. You must also move the corresponding input sets to the remote repository.

If your pipeline has a trigger, you must modify the YAML of the trigger to add a new field `pipelineBranchName`. This will ensure that your trigger works seamlessly with your pipeline.

Following is an example of a sample YAML for a trigger:

```yaml
trigger:
  name: sample trigger
  identifier: sample_trigger
  enabled: true
  orgIdentifier: sampleOrg
  projectIdentifier: sampleProject
  pipelineIdentifier: samplePipeline
  source:
    type: Webhook
    pollInterval: "0"
    spec:
      type: Github
      spec:
        type: PullRequest
        spec:
          connectorRef: sample_connector
          autoAbortPreviousExecutions: false
          repoName: sampleRepo
          actions:
            - Close
  pipelineBranchName: <+trigger.branch>
  inputSetRefs:
    - sampleinputset
```

{% endhint %}

### Move Inline Pipeline <a href="#move-inline-pipeline" id="move-inline-pipeline"></a>

This section explains steps to move an [inline pipeline](/harness-ai/use-harness-platform/pipelines/add-a-stage.md#step-1-create-a-pipeline) and its associated input sets to Git.

1. In app.harness.io, go to your project.
2. Select **Pipelines**.
3. Select **Move to Git** next to the inline pipeline you want to move to Git.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-68e58e55fafc5598a6203cedd2b719ec385d45e2%2Fmove-to-git-option.png?alt=media)
4. The **Move Pipeline to Git** dialog opens.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-884f0f099715f81072a49456bc69b7306a82a5f3%2Fmove-pipeline-togit.png?alt=media)
5. In **Git Connector**, select or create a Git Connector to the repo for your Project. For more information, see [Code Repo Connectors](/harness-ai/use-harness-platform/connectors/code-repositories/code-repositories-connectors-overview.md).

<details>

<summary>IMPORTANT</summary>

Connector must use the Enable API access option and Token The Connector must use the Enable API access option and Username and Token authentication. Harness requires the token for API access. Generate the token in your account on the Git provider and add it to Harness as a Secret. Next, use the token in the credentials for the Git Connector.​

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-fd1efb186d465a9dd42b1b410e84ff12fc80c369%2Fimport-a-pipeline-31.png?alt=media)

For GitHub, the token must have the following scopes:

![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-3cfdbf5c77b0415da12c2b4933ce58d3b81bf599%2Fimport-a-pipeline-32.png?alt=media)

</details>

6. In **Repository**, select your repository. There are only a few repositories listed here, so if yours is not listed, enter its name.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Create the repository in Git before entering it in <strong>Select Repository</strong>. Harness does not create the repository for you.</p></div>
7. In **Git Branch**, select your branch. If your branch is not listed, enter its name since only a select few branches are filled here.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Create the branch in your repository before entering it in <strong>Git Branch</strong>. Harness does not create the branch for you.</p></div>
8. Harness pre-populates the YAML Path. You can change this path and the file name.
9. Enter a message in **Commit Message**.
10. Select **Move to Git**.

    Your pipeline now appears in the list as a remote entity with the repository details next to it.

    ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-def90d8c075cc1ee5cf637338eae54961cddd83a%2Finline-to-remote-pipeline.png?alt=media)

### Move Inline Input Sets <a href="#move-inline-input-sets" id="move-inline-input-sets"></a>

After you move your pipeline to Git, you can move your input sets to Git as well.

1. Go to **Input Sets** in your pipeline.
2. Click the 3 dots to the right of the set and click **Move to Git**
3. Repeat steps 4-10 for [move inline pipeline](#move-inline-pipeline)

### Move Inline Process <a href="#move-inline-process" id="move-inline-process"></a>

This section explains steps to move an inline Release Orchestration process to Git.

The following demo shows the end-to-end flow of moving an inline process to Git:

{% embed url="<https://app.arcade.software/share/WCN2OebV4IvmalldvbGh>" %}

{% hint style="info" %}
Move to Git is available only when the process is stored inline. A process that is already remote does not show this option.
{% endhint %}

1. In app.harness.io, go to your project and select **Release Orchestration** > **Processes**.
2. Select the 3 dots next to the inline process you want to move, then select **Move to Git**.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-683ff225ffb7bb9944d76c390485393a805428e2%2Fmove-process-to-git-option.png?alt=media)
3. The **Move Process to Git** dialog opens.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-9a4c9935bfbf5a6b6afa7a43ede0d1e03c4b2929%2Fmove-process-to-git-dialog.png?alt=media)
4. In **Git Connector**, select or create a Git Connector to the repo for your project. For more information, go to [Code Repo Connectors](/harness-ai/use-harness-platform/connectors/code-repositories/code-repositories-connectors-overview.md).
5. In **Repository**, select your repository, or enter its name if it is not listed.
6. In **Git Branch**, select your branch, or enter its name if it is not listed.
7. Harness pre-populates the **File Path** as `.harness/process/<process-identifier>.yaml`. You can change this path and the file name.
8. Select **Continue**.

   Your process now appears in the list as a remote entity with the repository details next to it.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-32a8e1e965879d3a6cfbcec558029ac081156757%2Fprocess-remote-after-move.png?alt=media)

{% hint style="warning" %}
Moving a process to Git copies its YAML to the repository unchanged. Process inputs are not moved automatically and are not linked to the process move in any way; move each process input separately.
{% endhint %}

### Move Inline Activity <a href="#move-inline-activity" id="move-inline-activity"></a>

This section explains steps to move an inline Release Orchestration activity to Git.

The following demo shows the end-to-end flow of moving an inline activity to Git:

{% embed url="<https://app.arcade.software/share/xKBH9CbuHmTxpQXYigoK>" %}

1. In app.harness.io, go to your project and select **Release Orchestration** > **Activity Store**.
2. Select the 3 dots next to the inline activity you want to move, then select **Move to Git**.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-4333493b14b3b2a1301895277b2b46022655c54c%2Fmove-activity-to-git-option.png?alt=media)
3. The **Move Activity to Git** dialog opens with the same fields as the process dialog: **Git Connector**, **Repository**, **Git Branch**, and **File Path**.
4. Harness pre-populates the **File Path** as `.harness/activity/<activity-identifier>.yaml`. You can change this path and the file name.
5. Select **Continue**.

   Your activity now appears in the list as a remote entity with the repository details next to it.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-e192c5705c663fe8e157aa44a6e618de1e81b69d%2Factivity-remote-after-move.png?alt=media)

An activity moves independently of the process that references it. Moving a process to Git does not move its activities, and moving an activity does not require its process to be remote.

### Move Inline Process Input <a href="#move-inline-process-input" id="move-inline-process-input"></a>

Move to Git for a process input is available only after its parent process is already remote.

If the parent process is still inline, the **Move to Git** option next to a process input is disabled. Move the parent process to Git first, using the steps in [Move Inline Process](#move-inline-process).

Once the parent process is remote, any new process input set you create under it is created directly as remote, since Harness only shows Git configuration fields for input sets created under a remote process. A process input set created earlier, while the parent process was still inline, keeps its inline storage even after the parent process moves. Move that existing inline process input to Git separately:

The following demo shows the end-to-end flow of moving an inline process input to Git:

{% embed url="<https://app.arcade.software/share/25gizbl46AqlSkprcjz1>" %}

1. Go to **Input Store** in your process.
2. Select the 3 dots next to the inline process input, then select **Move to Git**.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-36030f5ff2c3792df5ba8a86760fbe4600e16de4%2Fmove-process-input-to-git-dialog.png?alt=media)
3. The **Move Process Input to Git** dialog opens. The Git Connector, Repository, and Git Branch are locked to the parent process and cannot be changed.
4. Harness pre-populates the **File Path** as `.harness/process/<process-identifier>/<input-set-identifier>.yaml`. You can change this path and the file name.
5. Select **Continue**.

   Your process input now appears in the list as a remote entity with the repository details next to it.

   ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-fd7b3caddf6a6b390f0ae454b0a2f704b438a123%2Fprocess-input-remote-after-move.png?alt=media)

Move each process input one at a time. Moving the parent process, or moving one process input, does not move any other process input.

***

### Next steps <a href="#next-steps" id="next-steps"></a>

* [Code Repo Connectors](/harness-ai/use-harness-platform/connectors/code-repositories/code-repositories-connectors-overview.md): Connect Harness to a Git repository before moving any inline entity.
* [Move inline pipeline](#move-inline-pipeline): Move a pipeline and its input sets to Git.
* [Move inline process](#move-inline-process): Move a Release Orchestration process to Git.
* [Move inline activity](#move-inline-activity): Move a Release Orchestration activity to Git.
* [Move inline process input](#move-inline-process-input): Move a Release Orchestration process input to Git.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-platform/git-experience/move-inline-entities-to-git" %}
