Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.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安装设置.gitignore文件_Wordpress_Git_Directory_Gitignore - Fatal编程技术网

正在尝试为Wordpress安装设置.gitignore文件

正在尝试为Wordpress安装设置.gitignore文件,wordpress,git,directory,gitignore,Wordpress,Git,Directory,Gitignore,我正在尝试为Wordpress安装设置git,并尝试编写一个.gitignore文件,该文件将排除除我的子主题文件夹之外的所有内容。以下是我到目前为止的情况: # Ignore everything in the root except the "wp-content" directory. /* !.gitignore !wp-content/ # Ignore everything in the "wp-content" directory, except the "plugins" #

我正在尝试为Wordpress安装设置git,并尝试编写一个.gitignore文件,该文件将排除除我的子主题文件夹之外的所有内容。以下是我到目前为止的情况:

# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/

# Ignore everything in the "wp-content" directory, except the "plugins"
# and "themes" directories.
wp-content/*
!wp-content/plugins/
!wp-content/themes/

# Ignore everything in the "plugins" directory, except the plugins you
# specify (see the commented-out examples for hints on how to do this.)
wp-content/plugins/*
# !wp-content/plugins/my-single-file-plugin.php
# !wp-content/plugins/my-directory-plugin/

# Ignore everything in the "themes" directory, except the themes you
# specify (see the commented-out example for a hint on how to do this.)
wp-content/themes/*
!wp-content/themes/my-theme/

这只是显示子主题文件夹本身,而不是内容。根据到目前为止我看到的文档,我觉得这不可能是正确的()。有什么建议吗?

只需创建一个子主题repo或git子模块。

只需创建一个子主题repo或git子模块。

可能是一个愚蠢的问题-但是你是否将你的主题文件夹添加到rep?可能是一个愚蠢的问题-但是你是否将你的主题文件夹添加到rep?