if the file starts with # or !, they will just become a comment in the .gitignorefile
Steps to reproduce the behavior:
- touch '#abc'
- select the file in working tree
- ignore by pressing i and then i
- the file is not being ignored
Version info:
commit=91cb1ff29a01fdf643ccc38b97fd816b2a097bec, build date=2025-01-11T04:06:07Z, build source=binaryRelease, version=0.45.0, os=windows, arch=amd64, git version=2.47.1.windows.2
git version 2.47.1.windows.2