[GH-ISSUE #6274] Binary files (*.png, *.ico, *.icns) listed as modified upon cloning the repository #50442

Closed
opened 2026-04-28 15:54:38 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @PAN-Chuwen on GitHub (Aug 9, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6274

What is the issue?

Description

Steps to Reproduce

  1. Clone the repository:

    git clone https://github.com/ollama/ollama.git
    
    cd ollama
    
  2. Check the status of the repository:

    git status
    

Expected Behavior

No files should be listed as modified immediately after cloning the repository.

Actual Behavior

The following binary files are listed as modified:

modified:  app/assets/app.ico

modified:  examples/modelfile-mario/logo.png

modified:  macapp/assets/icon.icns

modified:  macapp/assets/iconDarkTemplate.png

modified:  macapp/assets/iconDarkTemplate@2x.png

modified:  macapp/assets/iconDarkUpdateTemplate.png

modified:  macapp/assets/iconDarkUpdateTemplate@2x.png

modified:  macapp/assets/iconTemplate.png

modified:  macapp/assets/iconTemplate@2x.png

modified:  macapp/assets/iconUpdateTemplate.png

modified:  macapp/assets/iconUpdateTemplate@2x.png

Environment

  • Tested on macOS and a fresh Ubuntu 24.04 EC2 instance.

Analysis

The issue seems to be related to the handling of binary files. It appears that the .gitattributes file was not set correctly, causing Git to treat these binary files as text files.

Resolution

After adding the following lines to the .gitattributes file, the problem was resolved:

*.ico binary
*.png binary
*.icns binary

You can verify this by cloning the forked repository:

git clone https://github.com/PAN-Chuwen/ollama.git

Unclear Aspects

  • The exact cause of why Git treated these binary files as text files.
  • How Git handles LF/CRLF line endings in binary files.

OS

Linux, macOS

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @PAN-Chuwen on GitHub (Aug 9, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6274 ### What is the issue? ### Description #### Steps to Reproduce 1. Clone the repository: ```sh git clone https://github.com/ollama/ollama.git cd ollama ``` 2. Check the status of the repository: ```sh git status ``` #### Expected Behavior No files should be listed as modified immediately after cloning the repository. #### Actual Behavior The following binary files are listed as modified: ``` modified: app/assets/app.ico modified: examples/modelfile-mario/logo.png modified: macapp/assets/icon.icns modified: macapp/assets/iconDarkTemplate.png modified: macapp/assets/iconDarkTemplate@2x.png modified: macapp/assets/iconDarkUpdateTemplate.png modified: macapp/assets/iconDarkUpdateTemplate@2x.png modified: macapp/assets/iconTemplate.png modified: macapp/assets/iconTemplate@2x.png modified: macapp/assets/iconUpdateTemplate.png modified: macapp/assets/iconUpdateTemplate@2x.png ``` #### Environment - Tested on macOS and a fresh Ubuntu 24.04 EC2 instance. #### Analysis The issue seems to be related to the handling of binary files. It appears that the `.gitattributes` file was not set correctly, causing Git to treat these binary files as text files. #### Resolution After adding the following lines to the `.gitattributes` file, the problem was resolved: ``` *.ico binary *.png binary *.icns binary ``` You can verify this by cloning the forked repository: ```sh git clone https://github.com/PAN-Chuwen/ollama.git ``` #### Unclear Aspects - The exact cause of why Git treated these binary files as text files. - How Git handles LF/CRLF line endings in binary files. ### OS Linux, macOS ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-28 15:54:38 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 9, 2024):

https://github.com/ollama/ollama/pull/6235

<!-- gh-comment-id:2277211694 --> @rick-github commented on GitHub (Aug 9, 2024): https://github.com/ollama/ollama/pull/6235
Author
Owner

@FellowTraveler commented on GitHub (Aug 9, 2024):

#6183

<!-- gh-comment-id:2278322985 --> @FellowTraveler commented on GitHub (Aug 9, 2024): #6183
Author
Owner

@sammcj commented on GitHub (Aug 9, 2024):

Yeah I see this happen when people use Windows for development some times. This caused me headaches when trying to update a PR yesterday.

<!-- gh-comment-id:2278851382 --> @sammcj commented on GitHub (Aug 9, 2024): Yeah I see this happen when people use Windows for development some times. This caused me [headaches](https://github.com/ollama/ollama/pull/5894#issuecomment-2277316957) when trying to update a PR yesterday.
Author
Owner

@PAN-Chuwen commented on GitHub (Aug 10, 2024):

Issue resolved in #6235.

<!-- gh-comment-id:2278966332 --> @PAN-Chuwen commented on GitHub (Aug 10, 2024): Issue resolved in #6235.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#50442