I have a problem pushing all code to GitHub after installing a component using composer. Here's the current setup:
How do I get this git submodule component code into my GitHub repo? The folder in GitHub is empty.
Make sure you're properly added the files to the stage area and committed them. Then you could try to push again:
git add . #to add all files to stage
git commit -m "Your commit message here"
git push origin master #if master is your branch
Once you've said that the repository in GitHub is empty, you could try a force push :
git push --force origin master
Also, sometimes, there is a tiny delay between the push and the files become available in GitHub.
Additionally, you could verify if the changes were correctly sent to GitHub by checking the differences between branches:
git diff --name-status master..origin/master
Digging deeper, I found the component had installed itself as a git submodule. I've updated the question to reflect that. A standard git push didn't deploy it to github. I probably needed to do a "git push --recurse-submodules=on-demand" (or similar).
But to keep things simple, I decided to remove the submodule. It was necessary to run the following to remove the submodule reference.
git rm --cached [path to submodule]
Also, installed.json showed the "installation-source" = source. Other modules had value dist. So I deleted all component files and ran the following to force composer to install a component dist.
composer require [component] --prefer-dist
composer install --prefer-dist
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.