GitHub

177 阅读1分钟

公钥与私钥

  1. 公私钥存放位置:User/xxx/.ssh
  2. 生成公钥和私钥的命令:ssh-keygen -t -rsa -b 4096 C "你自己的邮箱地址"
  3. id_rsa 私钥文件 , id_rsa.pub 公钥文件
  4. 进入github个人空间,profile -> SSH and GPG Keys -> New SSH Key。将id_rsa.pub文件的内容copy进来.

本地仓库推到github

  1. git remote add 给远程仓库起一个本地名字(例:github,如果不设置 默认为origin) 远程仓库(xxxx.git)。
  2. git fetch github master
  3. git checkout master
  4. git merge --allow-unrelated-histories github/master
  5. git push github master

github快速搜索想要的资源

  1. xxxx in readme 在仓库的readme文件中搜索关键字
  2. xxx stars>1000 搜索大于1000星的仓库。
  3. filename:xxx 在code中搜索关键字