search

Home  >  Q&A  >  body text

github - git uploads projects to remote repositories

I just came into contact with git. I configured sublime text3 according to the steps on the Internet, and then went to git push origin master. An error was reported at this step, so I used the method provided by the blogger and executed git pull origin master first, but I got an error and could not read the remote warehouse. , please give me some advice.
1. The error is reported as shown in the figure

I checked some information, added the key for the Permission denied error, and then re-ran git pull origin master
As shown in the figure:

When running push
I still get an error here, I don’t quite understand it, please give me some advice

PHPzPHPz2775 days ago1080

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-05-17 10:04:27

    After searching for information, I finally uploaded it successfully
    Solution:
    Error about pull: refusing to merge...
    Because they are two different projects, to merge two different projects, git needs to add a line of code , in git pull, so
    git pull origin master --allow-unrelated-histories
    and then push is ok
    git push origin master

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-17 10:04:27

    First you need to bind it to the remote warehouse

    Remember to change it to your warehouse name.

    git remote add origin git@github.com:youngxhui/Test.git

    If it is the first time to submit to the remote warehouse

    $ git push -u origin master

    If it’s not your first time, just use it

    git push 

    You can push
    About using git, you can read my blog

    Basic git operations

    git usage tutorial and experience

    github usage tutorial (1)

    github usage tutorial (2)

    github usage tutorial (3)

    github usage tutorial (4)

    Personal blog

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-17 10:04:27

    git clone xxx.git
    git commit -m "xxx"
    git push 

    reply
    0
  • Cancelreply