如何将代码从cloud9推送到Github?

如何将代码从cloud9推送到Github?,git,github,cloud9,Git,Github,Cloud9,​我试了很多次,但都失败了。我的步骤如下所示 在my github中添加cloud9的SSH密钥,并将cloud 9与my github连接 新的回购协议称为git@github.com:XXX/XXX.git​ 在cloud 9中输入文件 git远程添加源git@github.com:XXX/XXX.git​​ git推送-u原始主机​ 这是典型的在GitHub端创建的非空的新回购协议(意思是使用README.md或许可证或…) 如果您尝试创建一个实际上为空的GitHub repo,您将不会看

​我试了很多次,但都失败了。我的步骤如下所示

  • 在my github中添加cloud9的SSH密钥,并将cloud 9与my github连接

  • 新的回购协议称为
    git@github.com:XXX/XXX.git

  • 在cloud 9中输入文件

  • git远程添加源git@github.com:XXX/XXX.git
    ​​

  • git推送-u原始主机​


  • 这是典型的在GitHub端创建的非空的新回购协议(意思是使用
    README.md
    许可证
    或…)


    如果您尝试创建一个实际上为空的GitHub repo,您将不会看到错误消息,也不需要在推之前执行
    git push

    尝试在推之前执行
    git pull origin master
    。谢谢!信息技术worked@QiyuZhang伟大的别忘了读书
    Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
        To git@github.com:XXX/XXX.git​
         ! [rejected]        master -> master (fetch first)
        error: failed to push some refs to 'git@github.com:XXX/XXX.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.
    
    Can some one help me? Thanks a lot!