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

    之后就成功了

  • 相关阅读:
    树莓派摄像头直播程序,非常希望有贡献者一起玩
    Ansible 操作windows
    Python实现自平衡二叉树AVL
    Python非递归遍历多叉树
    Python 非递归遍历图
    使用ffmpeg进行网络直播
    Python安装mysqldb
    运维工程师速成
    科幻小说《霜与火》 by 雷·布雷德伯里
    jvm 内存调整
  • 原文地址:https://www.cnblogs.com/huanggen/p/6524270.html
Copyright © 2011-2022 走看看