Closed jimafisk closed 2 years ago
You might have been running into issues with submodules (e.g. a project with its own .git
folder nested within another project with a .git
folder). I intended to design the Theming API in Plenti specifically to avoid this, so might need to double check that's working. Did you add the theme originally with: plenti new site edtechdesigner --theme=https://github.com/plenti-themes/compendium
?
Whatever the reason, it seems the theme was not being tracked in git. Running the following cleared things up:
git rm --cached themes/compendium/
Should be fixed in https://github.com/jamestagal/edtechdesigner/pull/6
Hi Jim, Thank you for replying. From memory I used the following command
plenti theme add git@github.com:plenti-themes/compendium
I ran your suggested command and then did a git add -A and got the following warning:
warning: adding embedded git repository: themes/compendium
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> themes/compendium
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached themes/compendium
hint:
hint: See "git help submodule" for more information.
then running git status it says:
❯ git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: themes/compendium (modified content, untracked content)
What should I do at this point? will doing the regular commit to git then push to repo work?
I see the warning message about submodule so to add all themes/compendium files now to git and then Github, do I need to use git submodule add
That's a bummer, so after running the plenti theme add
is there a themes/compendium/.git
folder? If so, just delete it manually: sudo rm -R themes/compendium/.git
. If not, try adding the theme files like this: git rm --cached themes/compendium/
.
You could also just merge the pull request I created and that should clear things up: https://github.com/jamestagal/edtechdesigner/pull/6
yes so there was but now after deleting the .git files manually as you have suggested the .git folder isn't there but after doing a git status git doesn't see themes/compendium/
saying "nothing to commit, working tree clean" ... shouldn't git now see these files as untracked content? I'm confused....anyway I could merge the pull request you suggested....but I have never done a merge before.. but happy to try...Is it straight forward? Which option should I take based on the screenshot below?
So if you deleted the .git
folder and the files still aren't tracking, you probably need to run the following (this is what I had to do on my end too when I cloned your repo):
git rm --cached themes/compendium/
To merge the pull request you can just leave the "create a merge commit" option and click the green "merge pull request" button. If you want a cleaner git history "squash and merge" them first so there are less commits, but it'll get you to the same place.
Thanks Jim. That did the trick! running the following git rm --cached themes/compendium/
Thank you for this.