Skip to content

LFS rules conflict with existing non‑LFS PNG, causing persistent dirty working tree #35

@AngLi-00

Description

@AngLi-00

In this repo, .gitattributes tracks *.png with Git LFS. The file g1.png is stored as a normal Git blob in history (not an LFS pointer). Because of that mismatch, Git LFS reports “should have been pointers” and the file cannot be cleanly checked out or discarded. git diff always shows a binary change, even when the user made no edits.

By the way, other file types which tracked by .gitattributes may have same issue, while I only face this issue with .png file.

Proposal (either should work)

  1. Migrate the file to LFS*
  2. Exclude this file from LFS in .gitattributes

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