1.生存密鑰:
$ ssh-keygen -t rsa -C “haiyan.xu.vip@gmail.com”
按3個回車挺据,密碼為空肛鹏。
在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報錯
本地獲取遠(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 在代碼(文件)層面上的差異