gitignore binary files that have no extension

前端 未结 18 1255
没有蜡笔的小新
没有蜡笔的小新 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:22

    Binary files are often without extensions. If this is your case try this:

    *
    !/**/
    !*.*
    

    REF: https://stackoverflow.com/a/19023985/1060487

提交回复
热议问题