---
title: "How to Ignore Builds - Optimize your Netlify Build Times"
description: "Unnecessary builds can be incredibly wasteful and time consuming. In this post we dive into Netlify"
source: "https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times/"
last_updated: "2026-07-10T19:48:11.000Z"
---
At Netlify, we try hard to optimize your builds by determining how your site has changed at any given update. To save users from the pain of wasted build minutes, Netlify tries to intelligently check for changes in a site’s base directory. It does this by comparing files in last known version to the latest updated version and automagically skips a build if no change is detected. If you’re keen on learning more about how Netlify skips builds, check out [this concise primer on Netlify’s deploy skipping feature](https://www.netlify.com/blog/2019/10/10/intelligent-deploy-skipping-an-automatic-optimisation/)

Though Netlify works hard to prevent unnecessary builds, it doesn’t always know when a build is undesired (like in the case of dependabot version bumps). In cases like these, Netlify offers users control over how and what gets built with the ignore setting in the configuration. With this, users have a more fine-grained control over their site builds and can appropriately ignore any and all unnecessary builds.

Ignoring unnecessary builds and updates is as easy as adding an ignore attribute to your configuration like so:

```
[build]  ignore = “git diff —quiet HEAD^ HEAD sub_dir/“
```

If you’re specifically looking to ignore dependabot updates, you can lean on Git log to surface changes in a commit and ignore the build appropriately like so:

```
[build]  ignore = "git log -1 --pretty=%B | grep dependabot"
```

For reference, an exit-code of 1 indicates the contents have changed, while an exit code of 0 indicates that no relevant changes have been detected. As a result, the former will continue the build per usual while the latter will exit the build and return early.

This process of ignoring builds can be incredibly handy when building fast and helps significantly when it comes to conserving your build minutes. For more tips and tricks on optimizing your deployments, head on over to the [Netlify Community forum](https://community.netlify.com/t/common-issue-how-can-i-optimize-my-netlify-build-time/3907).

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Ignore unnecessary builds to optimize your build times&url=https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2020%2F04%2F27%2Fignore-unnecessary-builds-to-optimize-your-build-times%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times//)
-   [Bluesky](https://bsky.app/intent/compose?text=Ignore unnecessary builds to optimize your build times+https://www.netlify.com/blog/2020/04/27/ignore-unnecessary-builds-to-optimize-your-build-times//)

* * *

### Tags

-   [Build](/blog/tags/Build/)
-   [Deployments](/blog/tags/deployments/)

## Keep reading

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials October 10, 2019

[

### Intelligent deploy skipping: An automatic optimisation

](/blog/2019/10/10/intelligent-deploy-skipping-an-automatic-optimisation/)

-   ![Profile picture of Phil Hawksworth](/_astro/9cfe2bbe94bcb555ce3ac7683ac7905ad3fd32b1-400x400_Z18H6R1.webp)
    
    Phil Hawksworth
    

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials February 25, 2020

[

### Gatsby Build Speed Improvements With Parallel Image Processing

](/blog/2020/02/25/gatsby-build-speed-improvements-with-parallel-image-processing/)

-   ![Profile picture of Jason Lengstorf](/_astro/11b8e51d90b26838de71904294430279b7099995-700x700_1R7sJe.webp)
    
    Jason Lengstorf
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)