为什么无法将我的wordpress目录推送到远程github存储库中?

显示键

目标:将/ var / www / html / wp推送到远程github存储库中的newstart中。

ssh -T [email protected]
You've successfully authenticated, but GitHub does not provide shell access.

ssh和github处于良好状态。

在偏远地区

1.创建一个newstart在github网页上命名的新项目

在当地

2.cd / var / wwww / html / wp
3.sudo git init
4.git add *
5.git push origin master
错误:src refspec master不匹配。
错误:无法将某些参照推送到“原点”

感谢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存储库中?

雏鸟
  1. 您没有git commit。
  2. 您没有告诉git是什么origin意思。您必须:

    $ git remote add origin remote repository URL
    

在这里查看说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法将我的本地git存储库推送到远程存储库

为什么设置了远程程序后,我无法在GitHub存储库上推送代码?

无法通过命令行将我的Web应用程序推送到GitHub存储库中

为什么我仍然无法将我的代码推送到 github?

Netbeans 无法推送到远程 github 存储库

无法推送到 GitHub 上的远程存储库

为什么我的远程Git存储库在推送到它后仍未提交更改?

为什么我推送到 GitHub 的 GitHub Pages 存储库没有上线?

无法推送到我的github私有存储库

无法推送到GitHub上的存储库

为什么我不能将我的 Laravel 项目推送到 github

为什么更新Gitlab后无法将更改推送到存储库中?

致命:无法从远程存储库读取。Github错误:无法将一些参照推送到

如何将我的git存储库推送到dokku?

当我尝试将代码添加到GitHub上的存储库时,出现类似“无法推送到远程存储库...”的错误。

为什么我无法将我的应用程序推送到Heroku?

无法通过VSCode在GitHub上推送到远程SSH存储库

推送到远程存储库

将我的第一个项目从我的 Git 推送到我的在线 GitHub 存储库

无法从本地存储库推送到github存储库

无法将一些引用推送到我的远程存储库

Git错误:远程解压缩失败:无法创建临时对象目录-尝试推送到远程存储库时

为什么 mongo 不能将我的 ObjectId 推送到预定义的数组中?

为什么将我的脚本推送到iframe中是在父级执行的?

无法将文件夹推送到Bitbucket中的远程存储库

致命:无法从远程存储库读取。当我将本地仓库推送到远程服务器时

VSCode 无法将内容推送到我的 GitHub 存储库

为什么我不能将此远程GitHub存储库添加为本地GIT存储库?

为什么laravel中的会话推送将我的值存储在索引为零的新数组中