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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:21:25  来源:igfitidea点击:

How to add icon to my repository?

gituser-interfacegitlabatlassian-sourcetreesourcetree

提问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.pngimage file to the root of your repository.

您可以向logo.png存储库的根目录添加一个小的(我更喜欢 96px x 96px)图像文件。

repository screenshot

存储库截图

Which makes your project more specific and easy to find with gitlabor SourceTreegit client. Unfortunately github does not support this feature.

这使您的项目更具体,更容易使用gitlabSourceTreegit 客户端找到。不幸的是 github 不支持此功能。

gitlab screenshot

gitlab 截图

It is very simple but it works!

这很简单,但它有效!

sourcetree screenshot

源码树截图

Update: Thanks to your comments I have found another way within Gitlab repository settings:

更新:感谢您的评论,我在 Gitlab 存储库设置中找到了另一种方法:

gitlab settings screenshot

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 中为您的项目添加图标,请执行以下说明:

  1. Go to your projectthen in left side click on 'Setting'
  2. Click on 'General'then in 'General project'section hit Expand
  3. Then in project avatar section hit Choose file...your avatar icon file and upload it.
  4. Finally hit Save changes
  1. 转到您的项目,然后在左侧单击“设置”
  2. 单击“常规”,然后在“常规项目”部分点击Expand
  3. 然后在项目头像部分点击Choose file...你的头像图标文件并上传它。
  4. 终于打了 Save changes


[NOTE]:

[注意]:

  • Note that you should have the Maintainerpermission on this project.
  • Maximum size is 200KB
  • 请注意,您应该拥有Maintainer此项目的权限。
  • 最大大小为 200KB