日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

fatal: Could not read from remote repository.的解决办法

發(fā)布時間:2025/3/11 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 fatal: Could not read from remote repository.的解决办法 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

原文地址:http://blog.csdn.net/huahua78/article/details/52330792

---------------------------------------------------------------------------------

查看遠端地址?git remote –v?
查看配置?git config --list

git status

git add . // 暫存所有的更改git checkout . // 丟棄所有的更改git status // 查看文件狀態(tài)git commit -m "本次要提交的概要信息" // 提交
  • 1
  • 2
  • 3
  • 4

設置遠端倉庫地址?git remote set-url origin 你的遠端地址?
git push origin master出現(xiàn)以下情況:

解決辦法:刪除當前key,然后重新生成key,

會在本地C:\Users\你的用戶名.ssh生成文件夾,里面有id_rsa和id_rsa.pub兩個文件?
然后復制id_rsa.pub文件里面的內容,到https://github.com/settings/keys新建一個,?
?
設置遠程地址:(上面新建的)?
git remote add origin_new 新的地址?
git remote –v查看?
git push origin_new master重新推送?
下面是設置用戶名?
Git config –global user.name “用戶名”?
git config –global user.email 郵箱地址

設置代理:?
git config –global https.proxy?http://127.0.0.1:1080?
取消設置代理:?
git config –global –unset https.proxy

取消git init操作時出現(xiàn)?rm: cannot remove ‘.git’: Is a directory?
是因為輸入的命令是:?rm -f .git?
解決辦法:rm -rf .git?即刪除整個.git目錄

failed to push some refs to ‘git@github.com:*.git’ hint: Updates were rejected ···?
使用git push origin master的時候出現(xiàn)一下錯誤:

解決辦法:?
git push -f origin master或者git pull下

恢復不小心刪除的?git stash?文件:

git fsck //找到dangling的對象 git show id //上面列出的每一條記錄的最后一個字符串,按 enter 查看具體信息 git stash apply id
  • 1
  • 2
  • 3

git 回滾提交

//reset將一個分支的末端指向另一個提交。這可以用來移除當前分支的一些提交, 讓master分支向后回退了兩個提交 git checkout master git reset HEAD~2//Revert撤銷一個提交的同時會創(chuàng)建一個新的提交, 找出倒數(shù)第二個提交,然后創(chuàng)建一個新的提交來撤銷這些更改,然后把這個提交加入項目中。 git revert HEAD~2
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

錯誤:Please enter a commit message to explain why this merge is necessary.?解決辦法:?
1. (可選)按鍵盤字母 i 進入insert模式?
2. (可選)修改最上面那行黃色合并信息?
3. 按鍵盤左上角”Esc” (退出insert模式)?
4. 輸入”:wq”,按回車鍵即可(提交)


總結

以上是生活随笔為你收集整理的fatal: Could not read from remote repository.的解决办法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。