Keeping WordPress Under [Version] Control with Git

My default .gitignore file looks something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Exclude these files from the git repo
wp-content/backup/*
wp-content/cache/*
wp-content/upgrade/*
wp-content/uploads/*
sitemap.*
wp-config.php
# Hidden system files
*.DS_Store
*[Tt]humbs.db
*.Trashes
# Include these files in previously blocked directories
!wp-content/uploads/.htaccess