Git sourceTree的使用

一、注册github 账号:注册地址:https://github.com/join?source=header-home

    

      填写,用户名,密码,邮箱地址,然后点击 “Create an account” 按钮点击创建,第二步,第三步,跳过

二 、下载git  

     输入地址:https://git-scm.com/download/  就会自动下载 git.exe 文件,选择默认安装即可

设置Git的user name和email:

$ git config --global user.name "xuhaiyan"
$ git config --global user.email "haiyan.xu.vip@gmail.com"
<span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">生成SSH密钥过程:</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">1.查看是否已经有了ssh密钥:cd ~/.ssh</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">如果没有密钥则不会有此文件夹,有则备份删除</span><br style="font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;" /><span style="margin: 0px; padding: 0px; font-size: 14px; line-height: 26px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif;">2.生存密钥:</span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;"></span><blockquote style="font-size: 14px; color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif; line-height: 1.62; margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; quotes: none; background-color: transparent;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">$ ssh-keygen -t rsa -C “<span style="margin: 0px; padding: 0px; line-height: 17px; background-color: transparent;">haiyan.xu.vip</span>@gmail.com”</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第一个参数:生成秘钥名称</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第二个参数:秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">输入第三个参数:确认秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;"><span style="color: rgb(34, 34, 34); font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22.6800003051758px;">最后得到了两个文件:XXX  和  XXX.pub</span>
</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">
</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">二,登陆管理员端,gitHug账户:</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">     找到项目:Settings  -- > Collaborators  添加账户名称</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">                                      --> Deploy keys     添加账户秘钥</p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent;">
</p></blockquote>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值