search

Home  >  Q&A  >  body text

github - How to push a local git project to a remote repository?

For my local project, follow the steps
git init
git add .
git commit -m
git remote add origin [remote warehouse]
git pull
Finally git Push origin master, why does it report an error? Can you tell me how to connect the local project to the remote warehouse according to the normal steps? Thanks!

怪我咯怪我咯2839 days ago873

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