> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/settings/git-integrations/overview-of-git-integrations.md).

# Overview of Git Integrations

{% hint style="warning" %}

#### Written for the Old UI

This article was written for the old UI. The instructions are still usable, but the screenshots are outdated. In some cases, items referenced in the instructions have moved or changed. If you cannot find an item, see the [Where Did It Go](/devops/new-ui-ux-transition/where-did-it-go.md) article.
{% endhint %}

## ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) Overview

The Git integration lets you connect your Git repository to DevOps, so Salesforce metadata managed in DevOps branches is automatically synced. This ensures that your branches and commits are tracked in your Git-based version control system. When a DevOps pull request is merged, a commit is created for the merged changes. The Git integration pushes this commit to the target branch in Git, but the pull request is not synced with Git.

{% hint style="info" %}

#### Best Practices

* Name DevOps branches using only letters, numbers, and these symbols: `_ / - .`. Avoid spaces or special characters to ensure smooth Git synchronization.
* Monitor the Git Integration **Activities** for exceptions and resolve them quickly.
* Use filters to audit specific branches, dates, or statuses.
  {% endhint %}

## Structure of Synced Repository

After DevOps completes a synchronization with a Push to Git job, the connected Git repository reflects the DevOps branch states. Each sync job creates a new commit for traceability. The table below explains how the integration handles each of the following items.

<table data-header-hidden><thead><tr><th width="180"></th><th></th></tr></thead><tbody><tr><td>Branches</td><td>Each DevOps branch is created or updated as a branch of the same name in your Git repository.</td></tr><tr><td>Commits</td><td>DevOps pushes commits to the branch. The commits always have <code>Devops sync. A branch is synced.</code> as the header. The commit body includes the Hash, Message, and CreatedAt for all DevOps commits pushed to Git during this sync.</td></tr><tr><td>Pull Requests</td><td>When a DevOps pull request is merged, a commit is created for the merged changes. The Git integration pushes this commit to the target branch in Git, but the pull request is not synced with Git. The pushed commit includes the following in the commit details: <code>Message: Merge branch</code>.</td></tr></tbody></table>

The repository is formatted as a **Salesforce DX Project**, with the following:

* Standard Folders
  * force-app/
  * config/
  * scripts/
* Standard Files
  * sfdx-project.json
  * package.json
  * README.md

The screenshot below shows an example of a branch in a GitHub repository that is synced with DevOps.

<figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F2SuhPHJlixMqCpLNqNeS%2FOverviewOfGitIntegrations-Repo-01.png?alt=media&amp;token=59ca4924-fa61-43c3-8bff-5d98c35c5ad1" alt=""><figcaption></figcaption></figure>

### DevOps Sync Commits

Each commit that DevOps pushes to Git has the following format:

#### Commit Header

{% code overflow="wrap" expandable="true" %}

```
Devops sync. A branch is synced.
```

{% endcode %}

#### Commit Body

{% code overflow="wrap" expandable="true" %}

```
Synced devops commits:

Hash: 
Message:
CreatedAt:
```

{% endcode %}

The commit body can include multiple DevOps commits, and the following information is provided for each DevOps commit.

<table data-header-hidden><thead><tr><th width="128.3333740234375"></th><th></th></tr></thead><tbody><tr><td>Hash</td><td>Hash code of the DevOps commit represented by this message.</td></tr><tr><td>Message</td><td>Message of the DevOps commit.</td></tr><tr><td>CreatedAt</td><td>The ISO 8601 timestamp when the commit was created in DevOps.</td></tr></tbody></table>

The following are example screenshots of DevOps-synced commits on GitHub.

<details>

<summary>Initial Branch Creation and Sync</summary>

When a Git repository is connected to an existing DevOps tenant, a branch is created, and an initial commit is pushed to Git that includes all commit messages in DevOps for that branch. The following is an example of an initial commit in GitHub.

<figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F81znbC6bp8uzTEfR7KBh%2FOverviewOfGitIntegrations-Commits-01.png?alt=media&amp;token=9186e33b-f6d5-4872-ae81-12a6cf975c3c" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>DevOps Commit</summary>

The following is an example of a DevOps commit in GitHub.

<figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Far5XPO59NVfT0exg1aNh%2FOverviewOfGitIntegrations-Commits-02.png?alt=media&amp;token=a228ead4-8cf0-4b2c-a9b3-6123cc5b7801" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>DevOps Pull Request Merge</summary>

When a DevOps pull request is merged, a commit is created for the merged changes. The Git integration pushes this commit to the target branch in Git, but the pull request is not synced with Git. The pushed commit includes the following in the commit details: `Message: Merge branch`. The following is an example of a merge commit in GitHub.

<figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FwKXbVPUTzMWgoNJLABUv%2FOverviewOfGitIntegrations-Commits-03.png?alt=media&amp;token=8030c406-c129-4f58-bf74-c036e2c7e412" alt=""><figcaption></figcaption></figure>

</details>

#### Bundled Commits

In some situations, the Git integration bundles multiple commits into a single commit that is synced to Git. In Git, the commit message includes details for each bundled DevOps commit. For example, when a component is edited in DevOps, the resulting commit is not pushed to Git until another branch action triggers a push. The following is an example of a bundled commit.

<div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FUzxCEwp4rX3gU9KmjzGt%2FOverviewOfGitIntegrations-Commits-04.png?alt=media&amp;token=9e1a79c7-287a-4e87-9f56-8d3309799864" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Commit bundling can cause Git to be temporarily out of sync with DevOps. However, once DevOps pushes the bundled commits to Git, the systems will be back in sync. If you are unsure whether a commit has been pushed to Git, compare the DevOps branch commits with the Git branch commits.
{% endhint %}

## Supported Git Hosts

DevOps can connect to the following hosts for Git repositories.

* GitHub
* GitLab
* Azure
* Bitbucket

Detailed instructions for connecting to GitHub are provided in the article below and can serve as a guide for connecting to the other hosts, as the process is similar.

* [Connecting a GitHub Repository](/devops/settings/git-integrations/connecting-a-github-repository.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/settings/git-integrations/overview-of-git-integrations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
