How to Add Tableau Project to GitHub

Cody Schneider8 min read

Putting "Tableau" and "GitHub" in the same sentence might sound strange at first. Isn't GitHub for developers and Tableau for data analysts? While that's mostly true, treating your Tableau projects like code by using a version control system like GitHub can save you from countless headaches and bring a new level of professionalism to your analytics workflow. This article will show you exactly how to add your Tableau projects to a GitHub repository, step-by-step.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Bother Using GitHub with Tableau?

Tableau’s built-in revision history is helpful for small, personal projects, but it falls short in a collaborative, fast-paced environment. Version control with Git and GitHub, the industry standard for software development, offers several game-changing benefits for data analysts and BI professionals.

  • A Complete Change History: GitHub tracks every single change you commit to your workbook. You can see exactly who changed what, when they changed it, and why (thanks to commit messages). This creates an auditable history of your Tableau workbook's entire life.
  • Worry-Free Experimentation: Want to test out a radical new visualization or change a fundamental business logic calculation? Create a "branch" in Git. This lets you work on a separate copy of your project without affecting the main version. If it works, you merge it back. If it doesn't, you can discard the branch without any harm done.
  • Better Collaboration: When multiple people work on the same workbook, it’s easy to accidentally overwrite each other’s work. GitHub solves this by providing a central repository that everyone pushes their changes to. Git is incredibly smart about merging changes from different people automatically.
  • Easy Reverts: Ever save a change and immediately realize you broke something critical? With GitHub, you can instantly revert your workbook to any previous version with a single command. It’s the ultimate undo button.
  • A Single Source of Truth: No more wondering if Dashboard_v3_final_FINAL.twb is the latest version. The main branch in your GitHub repository becomes the definitive, official version of your project, accessible to the entire team.

What You'll Need to Get Started

Before connecting your Tableau work to GitHub, you’ll need three things ready to go. Don't worry, they are all free and straightforward to set up.

  • Tableau Desktop: We assume you already have this, as you're working with Tableau workbooks.
  • A GitHub Account: If you don’t have one, head over to GitHub.com and sign up for a free account.
  • Git Installed Locally: Git is the underlying version control program that works on your computer. You can download and install it from the official Git website. The installation is a simple "next, next, finish" process. To confirm it's installed, you can open your computer's terminal (or Command Prompt on Windows) and type git --version.

Adding Your Tableau Project to GitHub: A Step-by-Step Guide

Now that you have the tools, let's walk through the process of getting a Tableau workbook into a GitHub repository.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 1: Unpackage Your Workbook (.twb vs. .twbx)

This is arguably the most critical step. Tableau workbooks come in two flavors: .twbx (Tableau Packaged Workbook) and .twb (Tableau Workbook).

  • A .twbx file is a package. It's essentially a zip file containing the workbook's layout, data sources, images, and extracts. From Git's perspective, this is a binary file, meaning Git can’t easily see the changes inside it.
  • A .twb file is just an XML file. It contains the structure, sheets, dashboards, and logic of your workbook, but it doesn't contain the actual data. Because it's a text-based format, Git can track line-by-line changes perfectly. This is exactly what we want.

To get started, open your project in Tableau Desktop. Go to File > Unpackage Workbook. Tableau will prompt you to save a .twb file and will place any associated data sources and images in a folder next to it. From now on, you'll work with this .twb file.

Step 2: Create a New Repository on GitHub

Your repository (or "repo") is the project locker on GitHub where your Tableau workbook and its history will live.

  1. Log in to your GitHub account.
  2. Click the "+" icon in the top-right corner and select "New repository."
  3. Give your repository a descriptive name, like sales-dashboard or marketing-analytics.
  4. You can add a brief description.
  5. Choose whether to make it Public (visible to anyone) or Private (visible only to you and collaborators you invite). For most business projects, you'll want to choose Private.
  6. Click "Create repository."

GitHub will show you a page with your new repository's URL. Keep this page open, you'll need the URL in the next step.

Step 3: Clone the Repository to Your Computer

Cloning simply means creating a local copy of the GitHub repository on your machine. This is where you'll do your actual work.

  1. Open your terminal application (Terminal on Mac/Linux, or Git Bash/Command Prompt on Windows).
  2. Navigate to the directory where you want to store your project. For example: cd Documents/Tableau-Projects.
  3. On the GitHub repository page, click the green "Code" button and copy the HTTPS URL.
  4. Back in your terminal, type git clone followed by the URL you just copied, and press Enter:

git clone https://github.com/your-username/sales-dashboard.git

This will create a new folder on your computer named sales-dashboard. This folder is now linked to your remote GitHub repo.

Step 4: Save Your .twb File to the Local Repo

Now, locate the .twb file (and the associated folder with data sources, if any) that you created in Step 1. Move or save these files directly into the new sales-dashboard folder that Git just created on your machine.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 5: Tell Git What to Ignore (Create a .gitignore file)

Your local project folder might contain files you don't want to track - most notably, huge data extracts (.hyper or old .tde files), system files, and log files. A .gitignore file tells Git to ignore specific files and folders.

In your new sales-dashboard folder, create a new text file and name it exactly .gitignore (the period at the beginning is important).

Open this file in a text editor and add the following lines:

# Ignore Tableau data extracts
*.hyper
*.tde

# Ignore temporary and log files
*.tmp
*.log
*~

# macOS system files
.DS_Store

# Windows system files
Thumbs.db

Save the file. Now, Git will not attempt to track any files ending with .hyper, .tde, etc., keeping your repository clean and lightweight.

Step 6: Commit and Push Your First Version

Finally, it's time to send your Tableau project to GitHub. This is a three-step process in the terminal. Make sure your terminal's current directory is inside your project folder (cd sales-dashboard).

  1. Stage Your Files Staging tells Git which files you want to include in your next snapshot. To stage all new and modified files, use:

git add .

  1. Commit Your Changes A "commit" is a snapshot of your staged files at a particular point in time. Every commit needs a descriptive message explaining what changed. This is your project logbook.

git commit -m "Initial commit: Add sales dashboard v1.0 and .gitignore"

Your commit message should be brief but informative. Examples include "Updated YoY sales calculation" or "Added Q3 campaign performance dashboard."

  1. Push to GitHub This final command sends your local commits up to the central repository on GitHub.

git push origin main

Now, go back to your repository page on GitHub and refresh it. You'll see your .twb file, your .gitignore file, and any other files you added, all safely stored and version-controlled!

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Your Ongoing Tableau + Git Workflow

Getting your project on GitHub is just the start. Your daily workflow will look something like this:

  1. Open the .twb file from your local Git repository folder.
  2. Make changes in Tableau Desktop and save the file.
  3. In your terminal, run git add ., then git commit -m "Your descriptive message", and finally git push origin main.

For more advanced use cases, explore Git branching. You can create a new branch to work on a major update, make several commits to that branch, and then merge it back into your main branch once you're confident it's complete and stable.

Final Thoughts

Using GitHub to manage your Tableau projects introduces a professional, robust workflow for tracking changes, collaborating with teammates, and protecting your work. It might feel like an extra step at first, but once you restore a workbook to a previous version after a major mistake or seamlessly merge changes from a colleague, you'll wonder how you ever managed without it.

Of course, version control focuses on managing the files of your report, but sometimes the real friction is just getting quick, real-time dashboards built in the first place. For teams who need to move faster, we built Graphed to bypass the manual design and development process entirely. Instead of spending hours in an interface like Tableau, you can simply ask for the dashboard you need in plain English - like "create a report showing sessions vs. conversions from Google Analytics for the last quarter." It connects directly to your live data sources and builds the dashboards for you instantly, enabling anyone on your team to answer questions without needing technical BI expertise or complex workflows.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!