github图片仓库的创建以及使用

使用流程

  1. 创建github仓库 (网络教程很多 不细说)

  2. 建立完 ,将项目clone到本地

  3. 在本地电脑中,寻找/创建一个合适的文件夹,将项目clone下来

    在Git bash 中运行 指令: git clone SSH

    图片

  4. 新建文件夹 并添加图片

  5. 在项目根目录 打开Git Bash 依次输入代码

    1
    2
    3
    git add .
    git commit -am 第一次添加图片
    git push
  6. 成功后回 github仓库中 即可查看到新添加的图片

  7. 进入仓库中 ,打开图片 对 图片右键,点击 复制图片地址 在markdown中 使用方式

    ![图片介绍可不写] ( 图片地址)

遇到问题

一. github 仓库 图片 裂开 无法显示 无法获取图片地址

进入C:\Windows\System32\drivers\etc\hosts 打开添加 代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# GitHub Start 
140.82.113.3 github.com
140.82.114.20 gist.github.com

151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
199.232.28.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
199.232.96.133 avatars.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.28.133 avatars0.githubusercontent.com
199.232.28.133 avatars1.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.108.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com
199.232.96.133 avatars9.githubusercontent.com

# GitHub End

然后保存文件就OK了,至于无法保存,没有修改权限,鼠标右键-属性-安全-修改权限;或将hosts文件复制一份,修改之后,复制到原文件夹替换!

( 可以 运行 记事本 然后右键 以管理员身份运行就可以保存了 不然没有权限)

保存后 win+R 运行 ipconfig/flush 刷新一下 回去github仓库就发现可以看到图片了

  • Copyrights © 2021 高志宏
  • 访问人数: | 浏览次数:

贫穷蒙蔽了我的双眼

支付宝
微信