github - git uploads projects to remote repositories
PHPz
PHPz 2017-05-17 10:02:27
0
3
1055

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

PHPz
PHPz

学习是最好的投资!

reply all(3)
小葫芦

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

世界只因有你

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

巴扎黑
git clone xxx.git
git commit -m "xxx"
git push 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!