标签:img 丢失 loading 新建 文件夹 error blog 修改 details
1、git的安装:(我是windows)
查看git版本号(未安装则不会出现版本号,去官网下载对应版本的git即可)
git --version
在桌面空白处右键,会出现git gui here和git bash here
2、github上头像不显示的问题及解决:
修改hosts文件:C:\Windows\System32\drivers\etc\hosts
(20210119有效/包括MAC系统,20210123更新)
# 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文件复制一份,修改之后,复制到原文件夹替换!
原网址:https://blog.csdn.net/qq_38232598/article/details/91346392
3、创建仓库,上传代码到github
(1)git init (2)git add . (3)git commit -m ‘第一次提交’ (4)git remote add origin https://github.com/chenyingying1016/learn-git.git (5)git push -u origin main
如果出现报错:
error: failed to push some refs to ‘https://github.com/chenyingying1016/learn-git.git‘
有以下三种解决方案:
1: 进行push前先将远程仓库pull到本地仓库
$ git pull origin master #git pull --rebase origin master
$ git push -u origin master
2: 强制push本地仓库到远程 (这种情况不会进行merge, 强制push后远程文件可能会丢失 不建议使用此方法)
$ git push -u origin master -f
3: 避开解决冲突, 将本地文件暂时提交到远程新建的分支中
$ git branch [name]
# 创建完branch后, 再进行push
$ git push -u origin [name]
我使用的是直接加入参数-f
标签:img 丢失 loading 新建 文件夹 error blog 修改 details
原文地址:https://www.cnblogs.com/chenyingying0/p/14342440.html