GitHub简介

github网址:https://github.com/

![img]( https://img-blog.csdnimg.cn/20210302143230671.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM5Njk3MzA2,size_16,color_FFFFFF,t_70)

![在这里插入图片描述]( https://img-blog.csdnimg.cn/20210302143237182.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM5Njk3MzA2,size_16,color_FFFFFF,t_70)

  1. 新建远程仓库

  • 远程仓库操作

    git remote -v #查看当前远程仓库地址别名
    git remote add 别名 https://github.com/whf778/git-lim.git #创建别名
    git push 别名 分支 #推送本地库分支到远程库
    git pull 别名 分支 #拉取远程库到本地库
    git clone https://github.com/whf778/git-lim.git #克隆远程库代码到本地库,克隆代码无需登录(其他成员)
    #团队外的需要将别人的代码叉到本地库(fork)
    

    clone会做以下操作:1、拉取代码 2、初始化本地库 3、创建别名

  • ssh免密登录

    1. 到C:\Users\lim 目录看有没有.ssh文件夹
    2. 没有右键点击git bash here
     ssh-keygen -t rsa -C lim.hundsun@com #生成公私钥,回车三次
     cd .ssh
     cat id_rsa.pub #查看公钥
    

    3.将公钥复制到以下


添加完毕就可以通过ssh链接pull push

posted @ 2022-02-11 09:37  lim_sy  阅读(141)  评论(0)    收藏  举报