我用全新的Wordpress安装设置了每个环境。然后,我从本地开发人员处进行初始提交,并开始与Gitflow Workflow. 然后,我将开发分支部署到临时环境,将主分支部署到活动站点。我忽略了中的所有上载wp-content/uploads
. 每个实例都将包含不同的内容,因为每个环境主要由不同的人/出于不同的目的/在不同的项目时间访问。这是我的.gitignore
:
# http://www.stumiller.me/what-should-be-excluded-in-a-wordpress-gitignore-file/
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
wp-config.php
wp-content/uploads/
wp-content/blogs.dir/
wp-content/upgrade/
wp-content/backup-db/
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
wp-content/cache/*
wp-content/cache/supercache/*
*.log
wp-content/cache/
wp-content/backups/
sitemap.xml
sitemap.xml.gz
# http://roybarber.com/version-controlling-wordpress/
wp-content/themes/*/.sass-cache/*
wp-config-local.php
readme.html
license.txt