git ssh/git status報(bào)錯(cuò)

1.生存密鑰:

$ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”

按3個(gè)回車,密碼為空。

在github上添加ssh密鑰,這要添加的是“id_rsa.pub”里面的公鑰

?測試是否成功:ssh git@github.com

The authenticity of host ‘github.com (207.97.227.239)’ can’t be established.

RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘github.com,207.97.227.239′ (RSA) to the list of known hosts.

ERROR: Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell access

Connection to github.com closed.


2.git status報(bào)錯(cuò)

本地獲取遠(yuǎn)程的變更(只是獲取,尚未合并):git remote update或者git fetch origin

接著,git status -uno:可以讓你看到當(dāng)前分支是否領(lǐng)先/落后/分叉于它跟蹤的遠(yuǎn)程分支

或者,git show-branch *master:可以讓你看到所有名字最后是 master 的分支的 commits,因此你可以看到 origin/master 和 master 在 commits 層面上的差異

最后,git diff origin/master:可以讓你看到 origin/master 和 master 在代碼(文件)層面上的差異

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容