GitHub integration ignores new files added via `shopify theme push`

Short description of issue

When using shopify theme push with a theme connected to GitHub, newly added files are missing from the commit created by the GitHub integration. Only changes to files that were already tracked appear to be committed.

Reproduction steps

  1. Connect a Shopify theme to a GitHub repository/branch using the Shopify GitHub integration.

  2. Make changes locally to the theme:

    • Modify an existing tracked file.
    • Add a new file, for example:
      snippets/new-snippet.liquid
  3. Push the theme using:
    shopify theme push

  4. Wait for the Shopify GitHub integration to create/sync the corresponding commit.

  5. Inspect the commit created by the GitHub integration.

  6. The modification to the existing file is included, but the newly created file is missing.

Additional info

Expected behavior:
All files uploaded by shopify theme push, including newly created files, should be included in the commit produced by the GitHub integration.

Actual behavior:
The GitHub integration appears to only commit modifications to files that were already tracked. Newly created files uploaded as part of the same shopify theme push are ignored.

Example:
If I modify sections/product.liquid and create a new file called snippets/new-snippet.liquid, both files are pushed to the Shopify theme.

However, the commit generated by the GitHub integration contains the modification to sections/product.liquid but does not contain snippets/new-snippet.liquid.

Impact:
This can result in broken or incomplete themes when the generated commit is later merged into another branch. Existing files may reference newly added snippets/assets/templates that are absent from Git, even though they were part of the original theme push.

What type of topic is this

Bug report

Hey @Piotr_Joniec - thanks for flagging this.

Could you run shopify theme push --verbose to reproduce the issue and share all the x-request-id values from the output? Please share only those IDs, since the full verbose output can contain sensitive data. This should let us trace the upload requests and the downstream GitHub sync to better understand what happened here.

Here are the request IDs from a reproduction. In this specific case, the modifications to blocks/_media_card.liquid weren’t included in the commit.

It turns out this bug is more complicated than a simple case of new files not being included in the commit. I can’t tell what’s causing it, and I don’t even know why it’s blocks/_media_card.liquid this time.

eab83388-6938-4a9a-a9ac-11abf3d0c014-1788548066
f3abb411-088a-43d0-b020-0c3fbbbdcbf4-1788548066
972fd7bf-5483-4b45-ba7f-5c89a00711b9-1788548074
f75b78df-d66d-4dcd-a599-0c783ff3bb58-1788548074
65d9b14b-d165-459f-9a70-33e945a02908-1788548074
2800d58a-aee1-4b4d-932b-61ba4f35b3cd-1788548074
84b0dc64-1387-4fa2-bfa7-ec0874d4c032-1788548075
215ab3bd-1cf6-4f0e-8181-aef239160985-1788548076
825f89a9-c22d-4a47-86a9-3e648596962a-1788548075
5f823fe5-23ab-4e15-aa96-57e163738490-1788548077

Hey @Piotr_Joniec - thanks for sending those through. That’s very helpful.

I’m digging into this now and will follow up here as soon as I have an update.