dbt and GitHub - Looking for basic understanding of how to connect

I’ve been using my dbt cloud trial for a couple weeks now and I’ve been learning a lot. I’m connected to a snowflake trial and I’ve set up several models and deployed them to production without any issues.

I’m now trying to get practice and gain a better understanding of git. I created a GitHub account and a repository. In my dbt account, I linked the GitHub account and it shows up under linked accounts.

I believe I now need to initialize my dbt project into GitHub, but I don’t know how to do that.

Google tells me..
Initialize a Local Git Repository (if not already done):

  • Open your terminal or command prompt.
  • Navigate to the root directory of your dbt project.
  • If you haven’t already initialized a Git repository in this directory, run: git init

I understand how to change directories in the command line, but where exactly is my root directory for my dbt project? I’m not clear on this since I’ve only been working directly in dbt cloud.

I’m running into some dead ends trying to figure this out on my own. I would be grateful for any help on this topic! Thank you.

You have to link the project to git :slight_smile: The link account means link dbt cloud account to github

Note: @keith_fajardo originally posted this reply in Slack. It might not have transferred perfectly.

So I decided to delete the first project I set up in dbt, and then re create a project, I was able to link my GitHub from there. I didn’t have a GitHub account when I created my first project in dbt, so that is a little perplexing that I had to re create a project to do it. Anyway, I have what I need now, although it seems I can’t approve my own PR in GitHub, so I can’t really do much with GitHub since these are my own personal trial accounts.