Home  >  Q&A  >  body text

github - git本地的项目怎么push到远程仓库去?

我在本地的项目,按照步骤
git init
git add .
git commit -m
git remote add origin [远程仓库]
git pull
最后git push orgin master,咋会报错呢?可以给我说说按照正常的步骤,本地的项目应该怎么和远程仓库连接吗?谢谢!

怪我咯怪我咯2706 days ago759

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:50:35

    Maybe something went wrong during git pull? Run itgit branch -avvgit status and see what the result is

    reply
    0
  • 怪我咯

    怪我咯2017-05-02 09:50:35

    Looking at https://github.com/Shen-Yu, there are so many projects here that don’t look like beginners... So I guess it is not the github account of the subject.
    I saw that you used pull, which means that if this is not your library and the other party has not authorized you, you do not have permission. You should use it git clone <url>. I will give you a reference by the way.

    Added a practical cheat sheet of commonly used Git commands, adopt it if it is useful.

    reply
    0
  • Cancelreply