Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 创建respository时未跟踪的git文件_Wordpress_Github - Fatal编程技术网

Wordpress 创建respository时未跟踪的git文件

Wordpress 创建respository时未跟踪的git文件,wordpress,github,Wordpress,Github,我有一个wordpress项目,我想将这些文件推送到我的存储库中 首先,当我提交时,我收到以下信息: Untracked files: wordpress/ 提交时未添加任何内容,但存在未跟踪的文件 之后,当我使用“git-push-origin-master”时,我有: error: src refspec master does not match any. error: failed to push some refs to 'https://github.com/isl

我有一个wordpress项目,我想将这些文件推送到我的存储库中

首先,当我提交时,我收到以下信息:

Untracked files:
        wordpress/
提交时未添加任何内容,但存在未跟踪的文件

之后,当我使用“
git-push-origin-master
”时,我有:

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/islem98/ProjetWordPress.git'

如何修复它?

您可能需要先添加,然后提交,才能将本地提交推送到远程回购

git add wordpress
git commit -m "Add wordpress"

git push -u origin master
注意:
-u
源站/master
设置为本地
主站
分支的,使您能够使用简单的
git推送
进行下一次要放入远程GitHub repo的提交。

请参阅“”。

有关详细信息,请参阅。您需要使用
git add
命令将文件添加到存储库中。然后需要使用
git commit
命令提交这些文件。如果git remote为空,您可能还需要使用
-u
标志