gitignore binary files that have no extension

前端 未结 18 1248
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 02:14

How can binary files be ignored in git using the .gitignore file?

Example:

$ g++ hello.c -o hello

The

18条回答
  •  醉话见心
    2020-11-28 02:18

    You may try in your .gitignore:

    *
    !*.c
    

    This approach has many disadvantages, but it's acceptable for small projects.

提交回复
热议问题