A few months ago I created a git repository for a project (for a WordPress web site) and have been developing it fairly regularly, so I have a decent sized history. Most, if not all, of my changes have occurred several levels in from my initial git directory (mysite/wp-content/themes/MyTheme, for example). While researching various ways to deploy the website to staging and production sites (with something other than ftp), I've been thinking that it might be better to put the git repo on the "MyTheme" folder instead of the entire folder structure. I would like to preserve the git history of what I've done in MyTheme, but I'm not sure if that's possible. I assume I can't just do a git init on the MyTheme directory (a new history will be created), and I've never seen anything about moving just the .git folder. Anyone have any suggestions?
Essentially I have this:
Mysite/
.git/
.gitignore
wp-content/
themes/
MyTheme/
other-files-and-folders
And I want this:
Mysite/
wp-content/
themes/
MyTheme/
.git/
.gitignore
other-files-and-folders
But I want to preserve whatever history affects MyTheme's content.