{"id":32725,"date":"2023-02-08T10:26:42","date_gmt":"2023-02-08T10:26:42","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32725"},"modified":"2023-02-08T10:29:43","modified_gmt":"2023-02-08T10:29:43","slug":"shell-script-to-git-add-and-commit-and-push-each-directory-at-a-time","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/shell-script-to-git-add-and-commit-and-push-each-directory-at-a-time\/","title":{"rendered":"Shell script to git add and commit and push each directory at a time"},"content":{"rendered":"\n<p>This script will loop through each directory in the repository, checking if it is a Git repository. If it is, it will add all changes in the directory, commit them with a message that includes the directory path, and push the changes to the remote repository. Note that this script assumes that the repository is structured such that each directory is a separate Git repository.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/5daa095b7af5e406196cfe83d2f13f7d.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>This script will loop through each directory in the repository, checking if it is a Git repository. If it is, it will add all changes in the directory, commit them&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-32725","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=32725"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32725\/revisions"}],"predecessor-version":[{"id":32727,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32725\/revisions\/32727"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}