php artisan optimize:clear
php artisan cache:clear
php artisan config:clear php artisan view:clear composer format yarn cache clean rm -rf node_modules rm yarn.lock yarn install yard build yarn lint
git checkout master
git pull origin master
git checkout -b main
git push origin main
Now, create a feature branch from main where you can work independently:
git checkout main
git checkout -b feature-module
git push origin feature-module
Work on your module in the feature-module branch. Commit your changes regularly:
git add . git commit -m "Describe your changes here"
Once you are done with changes and testing:
Push your changes
git push origin feature-module
git checkout main git pull origin main # Ensure main is up to date git merge feature-module git push origin main
After your changes in main are stable and tested:
git checkout master git pull origin master # Ensure master is up to date git merge main git push origin master
Whenever you need the latest stable version:
git checkout master git pull origin master
This workflow keeps your master branch stable while allowing development and testing in branches. It's a robust method to manage development in teams or even for solo projects