zoukankan      html  css  js  c++  java
  • 第一次用Github desktop(mac)提交代码遇到的问题

    1.新建代码仓库

    2.生成密钥

    ssh-keygen -C 'your@email.address' -t rsa

    3.到根目录下的.ssh文件夹下找到id_rsa.pub文件,将里面的内容复制到下图所标的位置

    4.在Git shell下输入ssh -T git@github.com测试刚才上传的公钥是否正确

    正确时会显示:

    Hi "Your Name"! You've successfully authenticated, but GitHub does not provide shell access.

     

    5.赋值刚创建的代码仓库的地址,把仓库内容clone到本地

    git clone https://github.com/YangXudongJack/JYMenuview.git

     

    6.这样就把代码clone到了本地,然后找到仓库文件,把要提交的代码文件copy到里面

     

    7.切到Git shell下输入命令

    git init

    git commit -m 'JYMenuview'

    git remote add origin https://github.com/YangXudongJack/JYMenuview.git

    git push origin master

     

     

    (1)如果执行git commit -m 'JYMenuview'报错提示

    On branch master

    Your branch is up-to-date with 'origin/master'.

    Untracked files:

    JYMenuview.xcodeproj/

    JYMenuview/

    JYMenuviewTests/

    JYMenuviewUITests/

    nothing added to commit but untracked files present

    则执行git add jymenuview.xcodeproj/,把提示的文件都加入到仓库的管理目录下

     

    (2)如果执行git remote add origin

    https://github.com/Flowerowl/stumansys.git

    ,出现错误:

      fatal: remote origin already exists

    则执行以下语句:

      git remote rm origin

    再往后执行git remote add origin https://github.com/Flowerowl/stumansys.git 即可。

    (3)在执行git push origin master时,报错:

      error:failed to push som refs to.......

    则执行以下语句:

      git pull origin master

    先把远程服务器github上面的文件拉下来,再push 上去。

  • 相关阅读:
    5,pandas高级数据处理
    4,根据美国各州人口,土地面积进行数据分析
    3,Python常用库之三:Matplotlib
    2,Python常用库之二:Pandas
    1,Python常用库之一:Numpy
    18,增量式爬虫
    17,基于scrapy-redis两种形式的分布式爬虫
    http超文本传输协议,get与post区别
    优化css,增加性能
    bootstrap常用知识点总结
  • 原文地址:https://www.cnblogs.com/mtjbz/p/5545550.html
Copyright © 2011-2022 走看看