正在尝试为Wordpress安装设置.gitignore文件
我正在尝试为Wordpress安装设置git,并尝试编写一个.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" #
# 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?