Git showing (modified content, untracked content) on Roots theme directory

Hi, I’m trying to manage my entire WP site in git but the Roots theme directory isn’t being tracked. Steps so far:

  • create and work on ‘draft’ wp site with roots theme in local dev env
  • init bare git repo on server (Webfaction)
  • clone the git repo from server to local dev env
  • in finder, copy files from ‘draft’ wp site to the empty git repo
  • git add and commit

All goes well, except Terminal tells me:

Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#	modified:   www/wp-content/themes/roots-oppfund2014 (modified content, untracked content)

and git add -A doesn’t add the directory as expected

a little research suggests its a git submodule thing, but i don’t have experience with that feature of git.

any suggestions or answers are appreciated.

When you cloned the Roots repo, you uhh… cloned the repo. So if you go to your roots-oppfund2014/ directory then you probably have the .git/ directory which you can safely delete. Just do rm -rf .git/.

Thank you, @cfx!

For anyone else with the same issue, after removing .git/ I also had to move the entire roots/ directory outside the themes/ folder (and entire wp project), commit that deletion, then add the roots/ directory back into themes/ and commit that addition before git started tracking changes as expected.

Great, glad you got it sorted.