Posts

Showing posts with the label How to

Git - merge investigation

1. How to find out if branch has been merged into your current branch 2. How to find out if your current branch has been merged into any other branch 1. To check if a feature or branch has been merged into your current branch , use the git branch --merged command, the git merge-base command, or inspect the git log.  Methods to Verify a Merge: 1. Using git branch --merged  This command lists all branches whose tips are reachable from your current branch's HEAD, meaning they are fully integrated.  First, ensure you are on the branch where you expect the feature to be merged (e.g., main): git checkout <current-branch-name> Then, run the command to list all merged branches: git branch --merged If the feature branch name appears in the output list, it has been merged into your current branch.  To see branches that have not been merged, you can use the --no-merged flag instead:  git branch --no-merged 2. Using git merge-base This method determines the common anc...

How to forget to run php ./vendor/bin/drush cr for ever

Image
How to forget to run php ./vendor/bin/drush cr for ever Yes, it is possible to automatically run   php ./vendor/bin/drush cr   on file save, typically by using file-watching tools like   nodemon ,   entr , or IDE-specific plugins (e.g., VS Code "Run on Save"). These tools detect file changes in your Drupal directory and execute the drush command to clear the cache.   Using  nodemon  (Node.js): Install  nodemon  and run: nodemon --watch web/modules --watch web/themes --ext php,yml,twig --exec "php ./vendor/bin/drush cr" Using  entr  (Unix tool): find . -name "*.php" -o -name "*.yml" -o -name "*.twig" | entr -p php ./vendor/bin/drush cr IDE Extension (VS Code): Install an extension like "Run on Save" and configure it to trigger  php ./vendor/bin/drush cr  when PHP, YML, or TWIG files are saved. Performance:  Automatically clearing cache on every save can slow down development, especially with large projects. Pathing: ...