Skip to content

🐞 files added to git but matching .gitignore are not added to Dagger builds #10996

Closed

Description

@danielgafni

What is the issue?

As I saw in one of the previous releases, Dagger is now by default filtering files from .gitignore.

This erroneously affects files that are already added staged (for ex with git add --force, or added prior to .gitignore modifications), but would have fallen under .gitignore if they wouldn't.

I have a few small .mp4 files checked into the repo for testing purposes. My .gitignore also ignores **/.mp4. My tests in Dagger now started failing after an upgrade to 0.8.17.

Files explicitly added to git should not be excluded from COPY operations - that's valid source code!

Dagger version

dagger v0.18.8 (docker-image://registry.dagger.io/engine:v0.18.8) linux/amd64

Steps to reproduce

  1. Add a file to git
  2. Edit .gitignore so that it captures this file
  3. Try running a Dagger build that needs this file

Log output

No response

Activity

  1. reopened this on Sep 9, 2025
  2. jedevc commented on Sep 9, 2025

    @jedevc
    Contributor

    Re-opening this, since this is a legitimate issue I want to track separately.

  3. bupd commented on Sep 24, 2025

    @bupd

    Please add an option to dagger that would allow to use the .gitignored files.

  4. locked and limited conversation to collaborators on Mar 25, 2026
  5. converted this issue into a discussion #12724 on Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions