Hey there folks, I’ve never had this problem before, so I’m slightly confused.
Downloaded wordpress, go to wp-content/themes.
Git clone latest roots.
Go to add roots with
git add wp-content/themes/roots/*
I get the following message:
Fatal: Pathspec 'wp-content/themes/roots/404.php' is in submodule 'wp-content/themes/roots'
What am I doing wrong?
You may have better luck deleting
wp-content/themes/roots and cloning directly into
git clone https://github.com/roots/roots.git .
That allows Git to create the project directory which you can then rename as needed. Don’t forget the period at the end of the command!
I did that to start the project. Let me try it again though.
Was troubleshooting this issue myself and found the underlying issue was that the parent .git repo thinks the Roots theme is a ‘Submodule’ (official docs on submodules).
This post from David Walsh did a terrific job walking me through the various steps to remove submodules. I had deleted my .git folder from the Roots.io theme folder however had yet to run the command in step 4…
git rm --cached path/to/submodule
Hope this helps, cheers!