git 如何将图标添加到我的存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40049648/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add icon to my repository?
提问by Mohsen Mirhoseini
I have found that Gitlab and SourceTree support icons for every repositories which make them more specific and easy to find at one glance.
我发现 Gitlab 和 SourceTree 支持每个存储库的图标,这使它们更加具体且易于一目了然。
How is this possible?
这怎么可能?
采纳答案by Mohsen Mirhoseini
We as a developer sometimes need a change to make our tools look different.
我们作为开发人员有时需要进行更改以使我们的工具看起来不同。
You can add a small(I prefer 96px x 96px) logo.png
image file to the root of your repository.
您可以向logo.png
存储库的根目录添加一个小的(我更喜欢 96px x 96px)图像文件。
Which makes your project more specific and easy to find with gitlabor SourceTreegit client. Unfortunately github does not support this feature.
这使您的项目更具体,更容易使用gitlab或SourceTreegit 客户端找到。不幸的是 github 不支持此功能。
It is very simple but it works!
这很简单,但它有效!
Update: Thanks to your comments I have found another way within Gitlab repository settings:
更新:感谢您的评论,我在 Gitlab 存储库设置中找到了另一种方法:
hope you enjoy this trick and make your tools more fun :)
希望你喜欢这个技巧,让你的工具更有趣:)
回答by Benyamin Jafari
If you want to put an icon on your project in Gitlab, do the following instructions:
如果您想在 Gitlab 中为您的项目添加图标,请执行以下说明:
- Go to your projectthen in left side click on 'Setting'
- Click on 'General'then in 'General project'section hit Expand
- Then in project avatar section hit Choose file...your avatar icon file and upload it.
- Finally hit Save changes
- 转到您的项目,然后在左侧单击“设置”
- 单击“常规”,然后在“常规项目”部分点击Expand
- 然后在项目头像部分点击Choose file...你的头像图标文件并上传它。
- 终于打了 Save changes
[NOTE]:
[注意]:
- Note that you should have the
Maintainer
permission on this project. - Maximum size is 200KB
- 请注意,您应该拥有
Maintainer
此项目的权限。 - 最大大小为 200KB