是否可以在git commit
中阻止特定文件类型(.dll,.exe)?
我知道我们可以通过 .gitignore
文件来做到这一点。但我有超过 500 个 repo,所以在每个项目中添加 .gitignore 文件并不容易。
我们可以通过 per-receive
钩子(Hook)做同样的事情,但我得到 Restrict the specific type file commit in Git 。
有什么想法吗?
最佳答案
您可以创建一个全局 .gitignore
文件。
如何 - https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
Open Terminal.
Run the following command in your terminal:
git config --global core.excludesfile ~/.gitignore_global
关于git - 如何阻止 Git 中某些特定类型的文件提交?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46398263/