目标:将远程github存储库中的/ var/www/html/wp推入newstart。为什么不能将我的wordpress目录推入远程github存储库?
ssh -T [email protected]
You've successfully authenticated, but GitHub does not provide shell access.
ssh和github处于良好状态。
在远程
1.To创建于GitHub的网页命名为newstart
新项目。
在当地
2.cd在/ var/WWWW/HTML/WP
3.sudo的git的init
4.git添加*
5.git推起源主
错误:SRC的Refspec主不匹配任何。
错误:未能将某些参考文献推送到“原点”
感谢ffledgling,添加了两个命令。
git commit -m "First commit"
git remote add origin git+ssh://[email protected]/someone/newstart.git
git push origin master
To git+ssh://[email protected]/someone/newstart.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git+ssh://[email protected]/someone/newstart.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.
如何将/ var/www/html/wp现在推送到远程github存储库中?
现在增加了两个命令,出现了新问题。 –