I have my laravel website on a shared hosting. I did this by putting the files inside the public folder into the public_html folder and putting the remaining files into a self-made folder outside the public_html.
Now my question is, how do I combine this with Git? I'm working with branches on Git, but I basically want what's inside the master branch to be uploaded to the hosting. How do I do this? Because my local Laravel project and the Github project are ofcourse different than the live Laravel project. How do I do this and is there also a way to do this automatically? So whenever the master branch updates, the live Laravel project will automatically pull the new code changes from the master branch?
I'm working on this project with a friend. Can we both use Laravel Forge with the Hobby plan? Because it says you can only share servers when you purchase the Business plan? $40 a month for something that's just a hobby between my friend and I is a bit too expensive for us.
I know it's against the rules, but you can still use one single account. You have so share the email and password, but that way you can get started at least ;)
There are programs that will sync to an FTP account, I use syncback.
I'm on Windows myself but surely Linux has a similar sync software.
You only need to sync the app stuff not the framework stuff which is the vendor folder.
Any confusion on that part just look on GitHub and you will see the Repository for the framework, that is the vendor folder. Do not sync that not necessary.
This is just so easy Once you practice one time.
EDIT: Forgot to mention, you have to use mirror source to destination.
highly recommended to use cloud hostings like DigitalOcean, AWS, Laravel Forge. shared hostings doesn't give you full opportunities to realize your project on production