gpt4 book ai didi

github - 在 GitHub 上更改存储库语言

转载 作者:行者123 更新时间:2023-12-01 00:14:03 30 4
gpt4 key购买 nike

我注意到 Github 选择 JavaScript 作为我的 Django 应用程序的语言:

enter image description here

是否可以将其更改为 Python?还是我需要创建一个新的存储库?

解决了:

正如@Geno Chen 所说,要更改存储库语言,我们必须添加包含此代码的文件 .gitattributes:

# to change language of repo from Javascript to Python
*.js linguist-language=Python

最佳答案

language detector统计您项目中的程序并显示带有比率的结果。如果您的存储库检测到错误的语言,您可以 follow the tutorial ,大多数时候你只需要override结果为 .gitattributes在包含类似教程示例的存储库根目录中,手动拉出特定编程语言的比率:

# Example of a `.gitattributes` file which reclassifies `.rb` files as Java:
*.rb linguist-language=Java

关于github - 在 GitHub 上更改存储库语言,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54946235/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com