I love using Git to organize version control and backup all my web files in Wordpress.
After updating plugins, I'd like to get the list of changes only on the direct subfolder by using git status
. Typically if doing git status will a very long line of changes including the inner of each subfolder.
what I'd like is to limit the result to the subfolders with the changes inside the plugins
directory.
For example, this git command:
git status project_folder/wp-content/plugins
will result to:
plugins/wpml-translation-management/classes/translation-basket/
plugins/wpml-translation-management/classes/translation-dashboard/
plugins/acfml/assets/
plugins/acfml/classes/class-wpml-acf-attachments.php
plugins/wordpress-seo/js/dist/commons-921.min.js
plugins/wordpress-seo/js/dist/components-921.min.js
Actually, the git command will make a really long list of lines like on the screenshot:
What I would love to know is the git command to output only:
plugins/wpml-translation-management/
plugins/acfml/
plugins/wordpress-seo/
Command such:
git status project_folder/wp-content/plugins --{display_only_direct_subfolders_with_changes}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…