top of page

.gitignore for Power BI Projects: A Simple Guide for the Modern BI Developer

  • Jihwan Kim
  • Jul 5
  • 4 min read


In this writing, I’d like to share how I learned and understood one of the most important—and often overlooked—files I encountered as I transitioned to modern Power BI development: the .gitignore file.


If you're an experienced Power BI developer, you've spent years mastering DAX, data modeling, and report design within the comfort of Power BI Desktop. The .pbix file has been your world. But now, with Power BI Projects (.pbip), the game is changing. We're being invited to work like software developers, using powerful tools like Git for version control and Visual Studio Code (VS Code) for editing our model and report files.  



This shift is exciting, but it comes with a new set of rules. The single most important first step in this new workflow is setting up my .gitignore file correctly. Think of it as setting up the safety rails in my new workshop. It prevents common, frustrating problems and ensures my projects stay clean, manageable, and easy to share with my team.



What is a .gitignore file and Why Do I Suddenly Need One?


For years, a .pbix file was a single, self-contained binary file. It was simple, but tracking changes was nearly impossible. When I save my work as a Power BI Project .pbip, Power BI Desktop breaks that single file apart into a structured folder of smaller, human-readable text files. This is fantastic because it allows a tool called Git to see exactly what I have changed—a single measure, a visual's property, etc.


Git is a version control system; its job is to watch every file in my project folder and record every change. However, Power BI Desktop creates several temporary, machine-specific files in my project folder that are not part of my actual report or semantic model design.   


This is where .gitignore comes in. It is simply a plain text file that lists all the files and folders I want Git to ignore. By ignoring these files, I prevent them from being saved in the shared team repository, which avoids a ton of headaches.



The "Must-Ignores": What Every Power BI Developer Should Ignore


When I save a .pbip, Power BI creates a hidden .pbi subfolder inside my Semantic Model folder. This folder contains files meant only for my local machine or for managing the editor state. I should always ignore this entire folder.

Here are the key files inside that folder and what I need to know about them:

  • cache.abf (Ignore): This is a local cache of my data model. Power BI Desktop uses it to make loading my model faster on my machine. This file can be very large, it changes every time I refresh my data, and its contents are completely irrelevant to the teammates. If I accidentally commit this file, my repository will become bloated, and I'll create unnecessary work for everyone.   

  • localSettings.json (Ignore): This file stores my personal settings, like the size and position of the Power Query window on my screen. If I commit this file, I will constantly be in "merge conflict" battles with my teammates as my settings overwrite theirs, and vice-versa. It adds zero value to the project.   

  • editorSettings.json (Good to Know): I also see this file. It contains shared editor settings for the semantic model that apply to everyone working on the project, such as whether to show hidden fields or enable parallel query loading. Unlike localSettings.json, these settings are meant to be consistent across the team. However, for simplicity and to follow the default behavior, my recommended .gitignore will ignore the entire .pbi folder, which includes this file.


By ignoring the entire .pbi folder, I automatically take care of the most problematic files (cache.abf and localSettings.json), keeping my project clean and focused only on the files that define my model and report.





.gitignore for Power BI Beginners


I don't need to create a massive, complicated file. A simple, well-commented .gitignore is all I need to get started. I create a new file named .gitignore in the root of my project folder and paste the following content into it. The comments (lines starting with #) explain what each line does.


#=======================================================================
# Power BI Project Ignores
#
# This section tells Git to ignore files generated by Power BI Desktop
# that are only for your local machine or for managing editor state.
#=======================================================================

# Ignore the entire.pbi folder found inside any semantic model folder.
# This is the most important rule. It excludes user-specific and temporary
# files like the large data cache (cache.abf) and personal settings
# (localSettings.json). For simplicity, it also ignores shared settings
# like editorSettings.json. The **/ pattern means it will find the.pbi
# folder no matter what your project is named.
**/.pbi/

# Ignore user-specific project files.
*.pbip.user


#=======================================================================
# Common Operating System Files
#
# These are junk files created by Windows or macOS.
#=======================================================================

# Windows
Thumbs.db
Desktop.ini

# macOS
.DS_Store


Conclusion


Adopting .pbip and Git is a major step forward for any serious Power BI developer. It enables true collaboration, version history, and opens the door to automation (CI/CD).  My .gitignore file is the first, and arguably one of the most critical, steps in this new journey. It’s a simple text file, but it establishes the professional habits that will prevent countless future problems.


I hope this helps having fun with building more robust and collaborative Power BI solutions.


Reference:

Comments


bottom of page