zoukankan      html  css  js  c++  java
  • git 使用https 和SSH 提交远程库小总结

    一、使用https提交远程库

    首先已经git commit -m “注释”

    本地仓库关联远程github服务器:git remote add origin  “https://XXXX.git”

    提交修改文件:git push origin master

    此处需要输入用户名密码:用户名就是登陆github的用户名,密码是github的密码

    如果你关联的远程仓库有文件没有pull到本地,此时需要git pull “https://XXX.git”

    二、由https切换到ssh提交

    先删除之前的http连接:git remote rm origin

    添加ssh连接:git remote add origin “git://XXXX.git”

    第一次提交修改文件:git push -u origin master

    再次提交只要git push

    ssh需要将.ssh文件夹中的公钥添加到github的Setting中SSH and GPG keys

  • 相关阅读:
    S03E01 蓝牙操作
    GET与POST方法
    Http请求头与响应头
    HttpClient初步
    Http
    深度为H的满k叉树
    html5-css选择器
    html5-css的使用强制优先级
    html5-样式表的使用-初步
    html5-css的引入
  • 原文地址:https://www.cnblogs.com/zhoumiao/p/10493403.html
Copyright © 2011-2022 走看看