gpt4 book ai didi

git - 如何在 GitHub 中 stash SVG 差异(或将 SVG 显示为图像)

转载 作者:行者123 更新时间:2023-12-05 04:14:57 28 4
gpt4 key购买 nike

最近我们经常将 SVG 文件添加到我们的 Git 存储库中。问题是 SVG 文件差异在 GitHub 上看到其他差异真的很烦人。

差异是这样的

+   <path class="st3" d="M179.7,29l-0.6-4c-0.1-0.7,0-1.3,0.4-2c1.5-2.8,2.6-6.2,3.4-10.3c0-0.3,0.2-0.5,0.4-0.6s0.5-0.2,0.8-0.1
+ l2.1,0.6c0.3,0.1,0.5,0.2,0.7,0.5s0.2,0.5,0.2,0.8c-0.3,2.2-0.8,4.2-1.4,6c0,0.1-0.1,0.2-0.1,0.3v18c0,0.3-0.1,0.6-0.3,0.8
+ c-0.2,0.2-0.5,0.3-0.8,0.3h-2.1c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.2-0.3-0.5-0.3-0.8V27.7c0-0.1,0-0.1-0.1,0c-0.5,0.9-0.8,1.4-0.8,1.5
+ c-0.1,0.2-0.2,0.2-0.4,0.2C179.8,29.3,179.7,29.2,179.7,29z M207.8,26.7c0,0.3-0.1,0.5-0.3,0.8c-0.2,0.2-0.5,0.3-0.8,0.3h-0.4
+ c0,0,0,0-0.1,0.1c0,0,0,0.1,0,0.1c0.1,0.1,0.4,0.6,0.9,1.4c0.2,0.3,0.2,0.5,0.2,0.8c0,0.3-0.2,0.5-0.4,0.7l-0.9,0.7
+ c-0.2,0.2-0.5,0.2-0.7,0.2c-0.3-0.1-0.5-0.2-0.6-0.5c-0.3-0.5-0.8-1.3-1.6-2.3c0,0-0.1,0-0.1,0c-0.2,0.6-0.7,0.9-1.4,1
+ c-0.7,0.1-2.2,0.2-4.4,0.2h-1.1c-0.1,0-0.2,0-0.2,0.1c0,0-0.1,0.1-0.2,0.2s-0.2,0.1-0.2,0.2c-0.1,0.1-0.1,0.1,0,0.1h8
+ c0.3,0,0.6,0.1,0.8,0.3c0.2,0.2,0.3,0.5,0.3,0.8V32c0,0.8-0.3,1.3-0.8,1.8c-0.5,0.5-1.1,0.9-1.8,1.3c0,0,0,0.1,0,0.1
+ c1.6,0.2,3.3,0.4,5.1,0.5c0.3,0,0.5,0.1,0.7,0.3s0.2,0.5,0.2,0.7l-0.4,1.5c-0.1,0.3-0.2,0.5-0.5,0.7c-0.2,0.2-0.5,0.2-0.9,0.2
+ c-3.2-0.3-6.2-0.9-9-1.9c-0.1,0-0.2,0-0.3,0c-2.7,0.9-5.6,1.5-8.8,1.9c-0.3,0-0.6,0-0.8-0.2c-0.3-0.2-0.4-0.4-0.5-0.7l-0.4-1.4

我们想将 SVG 文件作为图像进行跟踪,但 GitHub 将它们的差异显示为文本。有什么办法可以自动 stash 这些 SVG 文件差异?还是默认将它们显示为图像的方式?

最佳答案

GitHub 不提供任何方法来忽略差异中的某些文件。也许有一天(发送功能请求!)他们会像以前那样构建一个 SVG 查看器 for images .

与此同时,如果您还将 SVG 的渲染副本存储在存储库中,您至少可以获得两个 View 。信用to HBHB推荐Github diff helperGithub Collapse Diff Chrome 扩展也是如此。只是将它们从评论中 pull 出来以获得更好的可见性。

关于git - 如何在 GitHub 中 stash SVG 差异(或将 SVG 显示为图像),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33480883/

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