zoukankan      html  css  js  c++  java
  • git提交的错误

    今天学习python,之后想把学习时的代码推送的远程上,出来一些错误,想在想把这些问题记录下来

    $ git push -u origin master

    我首先提交,然后报错如下

    fatal: 'origin' does not appear to be a git repository
    fatal: Could not read from remote repository.


    Please make sure you have the correct access rights
    and the repository exists.

    后来就寻找问题,竟然发现我之前与远程库关联出错了(单词拼错了。。。。。晕)

    之后从新关联

    $ git remote add origin git@git.oschina.net:hu/python.git

    再提交  

    $ git push -u origin master
    然后又有报错

    error: failed to push some refs to 'git@git.oschina.net:huangen/python.git'
    hint: Updates were rejected because the remote contains work that you do
    hint: not have locally. This is usually caused by another repository pushing
    hint: to the same ref. You may want to first integrate the remote changes
    hint: (e.g., 'git pull ...') before pushing again.
    hint: See the 'Note about fast-forwards' in 'git push --help' for details.

    之后上网百度,上面说要让远程与本地同步

    于是乎  输入命令

    $ git pull --rebase origin master

    又有报错

    error: cannot pull with rebase: You have unstaged changes.
    error: please commit or stash them.

    现在,我发现运来本地有更改

    于是,我就从新来过

    git add .idea/

    $ git commit -m "python"

    $ git pull --rebase origin master

    $ git push -u origin master

    之后就成功了

  • 相关阅读:
    [SHOI2015]自动刷题机
    【教程】AI画放射图
    AI画圆角矩形
    极限运动:街头极限单车,不只是牛逼!
    DPK750针式打印机驱动,750u.dll下载
    文艺青年必看的Ⅹ部心理电影
    C语言程序设计-第2章 算法-程序的灵魂
    C语言程序设计-第1章 程序设计和C语言
    20151127笔记
    20151125小概念
  • 原文地址:https://www.cnblogs.com/huanggen/p/6524270.html
Copyright © 2011-2022 走看看