So, I tried pushing my laravel project to github but surprisingly, none of my directories where displaying only my readme file was displaying, below is an image of the repository on github
I tried commenting my gitignore files but I discovered it was taking about an hour to push to github so I killed the process, below are my gitignore files
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
/.idea
/.vscode
Have googled but I could not find a solution for it, will appreciate any help I can receive.
CodePudding user response:
Your screenshot shows main
branch, which has 1 commit
.
But if nothing is there, add them.
Run these:
git add . -f
git commit -m "All files"
git push origin main -f
CodePudding user response:
put the following characters your the gitignore file then try push your project on the github
.gitignore
# Created by https://www.toptal.com/developers/gitignore/api/laravel
# Edit at https://www.toptal.com/developers/gitignore?templates=laravel
### Laravel ###
/vendor/
node_modules/
npm-debug.log
yarn-error.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
# End of https://www.toptal.com/developers/gitignore/api/laravel