I created a composer package inside the vendors folder in a Laravel installation.
I then created a GitHub repository and initialized a git instance in the package to version control my changes on GitHub.
Finally, I installed my package on the same Laravel installation via the composer. (I added my package name and version to the
git add .
fatal: Not a git repository (or any of the parent directories): .git
1 - Delete your package folder in vendor
rm -rf vendor/yourname/yourpackagename
2 - Instal it again with sources
composer update --prefer-sources
The result of this is that
vendor/yourname/yourpackagename will be a git repository in the end, and you should be able to commit and push again.