Perform the following operations to reproduce the problem:
- Create new files main.c and com.h under the test directory structure. (test/main.c test/com.h)
- The content of the document is arbitrary, for example
- And then execute the instructions. (
git init git add --all `git commit -m "test")
- You will see that all lines in com.h display the ~ symbol

It should not display the ~ symbol.The prompt for the main.c file is normal.
I also found similar problems in my other warehouses, some of the file prompt is abnorma.
The following projects reproduce this problem
test.zip