Skip to content

gitignore does not ignore files that match containing folder pattern with certain file names #3679

Closed as not planned
@kylebez

Description

@kylebez
  • [* ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
    2.33.0.windows.2 64-bit
$ git --version --build-options

git version 2.33.0.windows.2
cpu: x86_64
built from commit: 8735530946cced809cc6cc4c2ca3b078cdb3dfc8
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon

 - Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
 10, 64-bit

$ cmd.exe /c ver

Microsoft Windows [Version 10.0.19042.1466]


 - What options did you set as part of the installation? Or did you choose the
   defaults? defaults

One of the following:

type "C:\Program Files\Git\etc\install-options.txt"
type "C:\Program Files (x86)\Git\etc\install-options.txt"
type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Git Pull Behavior Option: Merge
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

** insert your response here **

Details

  • Which terminal/shell are you running Git from?

CMD

Changed a set of binary files in the repo
  • What did you expect to occur after running these commands?

Based on my .gitignore, several files should be ignored, but many are not

  • What actually happened instead?

Files are not ignored when named a0000000[1-7].[xxx]. When named with six zeros, or eight zeros, it is ignored properly, or if the last digit is 7-9.

ere is the output of git check-ignore -v -n:

$ git check-ignore -v -n Projects/Default.gdb/a000000001.gdbtable .gitignore:280:Projects/**/*.gdb Projects/Default.gdb/a000000001.gdbtable

$ git check-ignore -v -n Projects/Default.gdb/a0000001.gdbtable .gitignore:280:Projects/**/*.gdb Projects/Default.gdb/a0000001.gdbtable

$ git check-ignore -v -n Projects/Default.gdb/a00000001.gdbtable :: Projects/Default.gdb/a00000001.gdbtable
git-bugreport-2022-01-31-0959.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions