Git: Ignore compiled Google Go

后端 未结 4 1571
长情又很酷
长情又很酷 2021-02-09 02:58

My compiled Go code does not end with an extension on Linux.

Any tips for handling ignoring these in the .gitignore file?

4条回答
  •  耶瑟儿~
    2021-02-09 03:28

    The .gitignore language isn't Turing complete. It can only match fairly simple patterns. This just means you need something else that can figure out what possible executables should be excluded. So, write a script that creates .gitignore based on the names of the executables that can be created. If you want to be fancy, make an alias that runs it before git add.

提交回复
热议问题