Skip to content

Commit

Permalink
consolidates git provider options (#6691)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Dec 24, 2024
2 parents a5ff11c + 62a6439 commit 7feed51
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The IDE features some delightful tools and layouts to make it easier for you to
<Lightbox src="/img/docs/dbt-cloud/cloud-ide/version-control-options-menu.png" width="30%" title="Right-click edited files to access Version Control Options menu"/>


- Use the **Prune branches** option to remove local branches that have already been deleted from the remote repository. Selecting this triggers a [pop-up modal](#prune-branches-modal), where you can confirm the deletion of the specific local branches, keeping your branch management tidy. Note that this won't delete the branch you're currently on. Pruning branches isn't available for [managed repositories](/docs/collaborate/git/managed-repository) because they don't have a typical remote setup, which prevents remote branch deletion.
- Use the **Prune branches** option to remove local branches that have already been deleted from the remote repository. Selecting this triggers a [pop-up modal](#prune-branches-modal), where you can confirm the deletion of the specific local branches, keeping your branch management tidy. Note that this won't delete the branch you're currently on. Pruning branches isn't available for [managed repositories](/docs/cloud/git/managed-repository) because they don't have a typical remote setup, which prevents remote branch deletion.

## Additional editing features

Expand Down
35 changes: 22 additions & 13 deletions website/docs/docs/cloud/git/git-configuration-in-dbt-cloud.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
---
title: "Git configuration in dbt Cloud"
title: "Configure Git in dbt Cloud"
description: "Learn about the Git providers supported in dbt Cloud"
pagination_next: "docs/cloud/git/import-a-project-by-git-url"
pagination_prev: null
hide_table_of_contents: true
pagination_next: "docs/cloud/git/managed-repository"
---

<div className="grid--2-col">
[Version control](/docs/collaborate/git/version-control-basics) &mdash; a system that allows you and your teammates to work safely and simultaneously on a single project &mdash; is an essential part of the dbt workflow. It enables teams to collaborate effectively and maintain a history of changes to their dbt projects.

In dbt Cloud, you can configure Git integrations to manage your dbt project code with ease. dbt Cloud offers multiple ways to integrate with you Git provider, catering to diverse team needs and preferences.

Whether you use a Git integration that natively connects with dbt Cloud or prefer to work with a managed or cloned repository, dbt Cloud supports flexible options to streamline your workflow.

<div className="grid--3-col">

<Card
title="Managed repository"
body="Learn how to quickly set up a project with a managed repository."
link="/docs/cloud/git/managed-repository"
icon="dbt-bit"/>

<Card
title="Import a project by git URL"
body="Learn how to import a project by using a git URL."
title="Git clone"
body="Learn how to connect to a git repository using a git URL and deploy keys."
link="/docs/cloud/git/import-a-project-by-git-url"
icon="dbt-bit"/>

<Card
title="Connect to GitHub"
body="Learn how to connect to GitHub."
body="Learn how to connect to GitHub using dbt Cloud's native integration."
link="/docs/cloud/git/connect-github"
icon="dbt-bit"/>

</div>
<br />
<div className="grid--2-col">
<Card
title="Connect to GitLab"
body="Learn how to connect to GitLab."
body="Learn how to connect to GitLab using dbt Cloud's native integration."
link="/docs/cloud/git/connect-gitlab"
icon="dbt-bit"/>

<Card
title="Connect to Azure DevOps"
body="Learn how to connect to Azure DevOps."
body="Learn how to connect to Azure DevOps using dbt Cloud's native integration. <br /><br />Available on dbt Cloud Enterprise plans."
link="/docs/cloud/git/connect-azure-devops"
icon="dbt-bit"/>

</div>
</div>
8 changes: 3 additions & 5 deletions website/docs/docs/cloud/git/import-a-project-by-git-url.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
---
title: "Import a project by git URL"
id: "import-a-project-by-git-url"
pagination_next: "docs/cloud/git/connect-github"
pagination_prev: null
title: "Connect with Git clone"
description: "Learn how to connect to a git repository using a git URL."
---

In dbt Cloud, you can import a git repository from any valid git URL that points to a dbt project. There are some important considerations to keep in mind when doing this.

## Git protocols
You must use the `git@...` or `ssh:..`. version of your git URL, not the `https://...` version. dbt Cloud uses the SSH protocol to clone repositories, so dbt Cloud will be unable to clone repos supplied with the HTTP protocol.

## Managing Deploy Keys
## Managing deploy keys

After importing a project by Git URL, dbt Cloud will generate a Deploy Key for your repository. To find the deploy key in dbt Cloud:

Expand Down
27 changes: 27 additions & 0 deletions website/docs/docs/cloud/git/managed-repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "Connect with managed repository"
id: "managed-repository"
description: "Learn how to set up a project with a managed repository."
pagination_next: "docs/cloud/git/import-a-project-by-git-url"
pagination_prev: "docs/cloud/git/git-configuration-in-dbt-cloud"
---

Managed repositories are a great way to trial dbt without needing to create a new repository. If you don't already have a Git repository for your dbt project, you can let dbt Cloud host and manage a repository for you.

If in the future you choose to host this repository elsewhere, you can export the information from dbt Cloud at any time. Refer to [Move from a managed repository to a self-hosted repository](/faqs/Git/managed-repo) for more information on how to do that.


:::info
dbt Labs recommends against using a managed repository in a production environment. You can't use Git features like pull requests, which are part of our recommended version control best practices.
:::

To set up a project with a managed repository:

1. From your **Account settings** in dbt Cloud, select the project you want to set up with a managed repository. If the project already has a repository set up, you need to edit the repository settings and disconnect the existing repository.
2. Click **Edit** for the project.
3. Under Repository, click **Configure repository**.
4. Select **Managed**.
5. Enter a name for the repository. For example, "analytics" or "dbt-models."
6. Click **Create**.
<Lightbox src="/img/docs/dbt-cloud/cloud-configuring-dbt-cloud/managed-repo.png" title="Adding a managed repository"/>

20 changes: 0 additions & 20 deletions website/docs/docs/collaborate/git/managed-repository.md

This file was deleted.

2 changes: 1 addition & 1 deletion website/docs/docs/collaborate/git/pr-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The PR Template URL setting will be automatically set for most repositories, dep

- If you connect to your repository via in-app integrations with your git provider or the "Git Clone" method via SSH, this URL setting will be auto-populated and editable.
- For AWS CodeCommit, this URL setting isn't auto-populated and must be [manually configured](/docs/cloud/git/import-a-project-by-git-url#step-5-configure-pull-request-template-urls-optional).
- If you connect via a dbt Cloud [Managed repository](/docs/collaborate/git/managed-repository), this URL will not be set, and the IDE will prompt users to merge the changes directly into their default branch.
- If you connect via a dbt Cloud [Managed repository](/docs/cloud/git/managed-repository), this URL will not be set, and the IDE will prompt users to merge the changes directly into their default branch.

The PR template URL supports two variables that can be used to build a URL string.
These variables, `{{source}}` and `{{destination}}` return branch names based on the
Expand Down
11 changes: 8 additions & 3 deletions website/docs/faqs/Git/gitignore.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ id: gitignore

A `.gitignore` file specifies which files git should intentionally ignore or 'untrack'. dbt Cloud indicates untracked files in the project file explorer pane by putting the file or folder name in *italics*.

If you encounter issues like problems reverting changes, checking out or creating a new branch, or not being prompted to open a pull request after a commit in the dbt Cloud IDE &mdash; this usually indicates a problem with the [.gitignore](https://github.com/dbt-labs/dbt-starter-project/blob/main/.gitignore) file. The file may be missing or lacks the required entries for dbt Cloud to work correctly.
If you encounter issues like problems reverting changes, checking out or creating a new branch, or not being prompted to open a pull request after a commit in the dbt Cloud IDE &mdash; this usually indicates a problem with the [.gitignore](https://github.com/dbt-labs/dbt-starter-project/blob/main/.gitignore) file. The file may be missing or lacks the required entries for dbt Cloud to work correctly.

### Fix in the dbt Cloud IDE
The following sections describe how to fix the `.gitignore` file in:

<Expandable alt_header="Fix in the dbt Cloud IDE">

To resolve issues with your `gitignore` file, adding the correct entries won't automatically remove (or 'untrack') files or folders that have already been tracked by git. The updated `gitignore` will only prevent new files or folders from being tracked. So you'll need to first fix the `gitignore` file, then perform some additional git operations to untrack any incorrect files or folders.

Expand Down Expand Up @@ -51,7 +53,9 @@ For more info on `gitignore` syntax, refer to the [Git docs](https://git-scm.com

<Lightbox src="/img/docs/dbt-cloud/cloud-ide/gitignore-italics.png" width="50%" title="A dbt project on the main branch that has properly configured gitignore folders (highlighted in italics)."/>

### Fix in the git provider
</Expandable>

<Expandable alt_header="Fix in the Git provider">

Sometimes it's necessary to use the git providers web interface to fix a broken `.gitignore` file. Although the specific steps may vary across providers, the general process remains the same.

Expand Down Expand Up @@ -121,3 +125,4 @@ dbt_modules/
</Tabs>

For more info, refer to this [detailed video](https://www.loom.com/share/9b3b8e2b617f41a8bad76ec7e42dd014) for additional guidance.
</Expandable>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Your IDE session experienced an unknown error and was terminated. Please contact

```

You can try to resolve this by adding a repository like a [managed repository](/docs/collaborate/git/managed-repository) or your preferred Git account. To add your Git account, navigate to **Project** > **Repository** and select your repository.
You can try to resolve this by adding a repository like a [managed repository](/docs/cloud/git/managed-repository) or your preferred Git account. To add your Git account, navigate to **Project** > **Repository** and select your repository.


If you're still running into this error, please contact the Support team at [email protected] for help.
4 changes: 2 additions & 2 deletions website/docs/guides/dbt-python-snowpark.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ We need to obtain our data source by copying our Formula 1 data into Snowflake t
## Configure dbt Cloud
1. We are going to be using [Snowflake Partner Connect](https://docs.snowflake.com/en/user-guide/ecosystem-partner-connect.html) to set up a dbt Cloud account. Using this method will allow you to spin up a fully fledged dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [managed repository](/docs/collaborate/git/managed-repository), environments, and credentials already established.
1. We are going to be using [Snowflake Partner Connect](https://docs.snowflake.com/en/user-guide/ecosystem-partner-connect.html) to set up a dbt Cloud account. Using this method will allow you to spin up a fully fledged dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [managed repository](/docs/cloud/git/managed-repository), environments, and credentials already established.
2. Navigate out of your worksheet back by selecting **home**.
3. In Snowsight, confirm that you are using the **ACCOUNTADMIN** role.
4. Navigate to the **Data Products** **> Partner Connect**. Find **dbt** either by using the search bar or navigating the **Data Integration**. Select the **dbt** tile.
Expand All @@ -282,7 +282,7 @@ We need to obtain our data source by copying our Formula 1 data into Snowflake t
9. Select **Complete Registration**. You should now be redirected to your dbt Cloud account, complete with a connection to your Snowflake account, a deployment and a development environment, and a sample job.
10. To help you version control your dbt project, we have connected it to a [managed repository](/docs/collaborate/git/managed-repository), which means that dbt Labs will be hosting your repository for you. This will give you access to a Git workflow without you having to create and host the repository yourself. You will not need to know Git for this workshop; dbt Cloud will help guide you through the workflow. In the future, when you’re developing your own project, [feel free to use your own repository](/docs/cloud/git/connect-github). This will allow you to learn more about features like [Slim CI](/docs/deploy/continuous-integration) builds after this workshop.
10. To help you version control your dbt project, we have connected it to a [managed repository](/docs/cloud/git/managed-repository), which means that dbt Labs will be hosting your repository for you. This will give you access to a Git workflow without you having to create and host the repository yourself. You will not need to know Git for this workshop; dbt Cloud will help guide you through the workflow. In the future, when you’re developing your own project, [feel free to use your own repository](/docs/cloud/git/connect-github). This will allow you to learn more about features like [Slim CI](/docs/deploy/continuous-integration) builds after this workshop.
## Change development schema name navigate the IDE
Expand Down
4 changes: 2 additions & 2 deletions website/docs/guides/sl-snowflake-qs.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ There are two ways to connect dbt Cloud to Snowflake. The first option is Partne
<Tabs>
<TabItem value="partner-connect" label="Use Partner Connect" default>

Using Partner Connect allows you to create a complete dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [a managed repository](/docs/collaborate/git/managed-repository), [environments](/docs/build/custom-schemas#managing-environments), and credentials.
Using Partner Connect allows you to create a complete dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [a managed repository](/docs/cloud/git/managed-repository), [environments](/docs/build/custom-schemas#managing-environments), and credentials.

1. In the Snowflake UI, click on the home icon in the upper left corner. In the left sidebar, select **Data Products**. Then, select **Partner Connect**. Find the dbt tile by scrolling or by searching for dbt in the search bar. Click the tile to connect to dbt.

Expand Down Expand Up @@ -333,7 +333,7 @@ Using Partner Connect allows you to create a complete dbt account with your [Sno
</Tabs>

## Set up a dbt Cloud managed repository
If you used Partner Connect, you can skip to [initializing your dbt project](#initialize-your-dbt-project-and-start-developing) as Partner Connect provides you with a [managed repository](/docs/collaborate/git/managed-repository). Otherwise, you will need to create your repository connection.
If you used Partner Connect, you can skip to [initializing your dbt project](#initialize-your-dbt-project-and-start-developing) as Partner Connect provides you with a [managed repository](/docs/cloud/git/managed-repository). Otherwise, you will need to create your repository connection.

<Snippet path="tutorial-managed-repo" />

Expand Down
2 changes: 1 addition & 1 deletion website/docs/guides/snowflake-qs.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ There are two ways to connect dbt Cloud to Snowflake. The first option is Partne
<Tabs>
<TabItem value="partner-connect" label="Use Partner Connect" default>

Using Partner Connect allows you to create a complete dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [a managed repository](/docs/collaborate/git/managed-repository), [environments](/docs/build/custom-schemas#managing-environments), and credentials.
Using Partner Connect allows you to create a complete dbt account with your [Snowflake connection](/docs/cloud/connect-data-platform/connect-snowflake), [a managed repository](/docs/cloud/git/managed-repository), [environments](/docs/build/custom-schemas#managing-environments), and credentials.

1. In the Snowflake UI, click on the home icon in the upper left corner. In the left sidebar, select **Data Products**. Then, select **Partner Connect**. Find the dbt tile by scrolling or by searching for dbt in the search bar. Click the tile to connect to dbt.

Expand Down
2 changes: 1 addition & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const sidebarSettings = {
},
items: [
"docs/cloud/git/git-configuration-in-dbt-cloud",
"docs/cloud/git/managed-repository",
"docs/cloud/git/import-a-project-by-git-url",
"docs/cloud/git/connect-github",
"docs/cloud/git/connect-gitlab",
Expand Down Expand Up @@ -552,7 +553,6 @@ const sidebarSettings = {
items: [
"docs/collaborate/git-version-control",
"docs/collaborate/git/version-control-basics",
"docs/collaborate/git/managed-repository",
"docs/collaborate/git/pr-template",
"docs/collaborate/git/merge-conflicts",
],
Expand Down
2 changes: 1 addition & 1 deletion website/snippets/available-git-providers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
When you develop in dbt Cloud, you can leverage [Git](/docs/collaborate/git-version-control) to version control your code.

To connect to a repository, you can either set up a dbt Cloud-hosted [managed repository](/docs/collaborate/git/managed-repository) or directly connect to a [supported git provider](/docs/cloud/git/connect-github). Managed repositories are a great way to trial dbt without needing to create a new repository. In the long run, it's better to connect to a supported git provider to use features like automation and [continuous integration](/docs/deploy/continuous-integration).
To connect to a repository, you can either set up a dbt Cloud-hosted [managed repository](/docs/cloud/git/managed-repository) or directly connect to a [supported git provider](/docs/cloud/git/connect-github). Managed repositories are a great way to trial dbt without needing to create a new repository. In the long run, it's better to connect to a supported git provider to use features like automation and [continuous integration](/docs/deploy/continuous-integration).
7 changes: 6 additions & 1 deletion website/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"cleanUrls": true,
"trailingSlash": false,
"redirects": [
{
"source": "/docs/collaborate/git/managed-repository",
"destination": "/docs/cloud/git/managed-repository",
"permanent": true
},
{
"source": "/faqs/API/rotate-token",
"destination": "/docs/dbt-cloud-apis/service-tokens#service-token-update",
Expand Down Expand Up @@ -1372,7 +1377,7 @@
},
{
"source": "/docs/dbt-cloud/cloud-configuring-dbt-cloud/cloud-using-a-managed-repository",
"destination": "/docs/collaborate/git/managed-repository",
"destination": "/docs/cloud/git/managed-repository",
"permanent": true
},
{
Expand Down

0 comments on commit 7feed51

Please sign in to comment.