{"id":2238,"date":"2012-06-17T10:53:41","date_gmt":"2012-06-17T08:53:41","guid":{"rendered":"http:\/\/blog.unelink.es\/?p=2238"},"modified":"2012-06-14T10:54:19","modified_gmt":"2012-06-14T08:54:19","slug":"script-para-automatizar-la-creacion-de-repositorios-git","status":"publish","type":"post","link":"https:\/\/hosting.airetech.es\/blog\/wiki\/script-para-automatizar-la-creacion-de-repositorios-git\/","title":{"rendered":"Script para automatizar la creaci\u00f3n de repositorios GIT"},"content":{"rendered":"<p>BARE REPO<\/p>\n<pre>\r\n#!\/bin\/sh\r\n\r\nGIT_OWNER=\"__PON_TU_NOMBRE__\"\r\nGIT_EMAIL=\"__PON_TU_EMAIL\"\r\nGIT_HOME=\"__RUTA_ABSOLUTA_HOME_GIT__\"\r\nGIT_REPO=$1\".git\"\r\n\r\ncd ${GIT_HOME}\r\nmkdir ${GIT_REPO}\r\ncd ${GIT_REPO}\r\n\r\ngit init --bare\r\ngit config --global user.name ${GIT_OWNER}\r\ngit config --global user.email ${GIT_EMAIL}\r\ngit repo-config core.sharedRepository true\r\n\r\ncd ${GIT_HOME}\r\nchown -R git:git ${GIT_REPO}\r\nchmod -R 775 ${GIT_REPO}\r\nchmod -R g+ws ${GIT_REPO}\r\nchgrp -R git ${GIT_REPO}\r\n<\/pre>\n<p>NO BARE REPO<\/p>\n<pre>\r\n#!\/bin\/sh\r\n\r\nGIT_OWNER=\"__PON_TU_NOMBRE__\"\r\nGIT_EMAIL=\"__PON_TU_EMAIL\"\r\nGIT_HOME=\"__RUTA_ABSOLUTA_HOME_GIT__\"\r\nGIT_REPO=$1\".git\"\r\n\r\ncd ${GIT_HOME}\r\nmkdir ${GIT_REPO}\r\ncd ${GIT_REPO}\r\n\r\ngit init\r\necho \"${GIT_REPO} PROJECT\" > ${GIT_HOME}${GIT_REPO}\/.git\/description\r\necho \"README FILE\" > ${GIT_HOME}${GIT_REPO}\/README\r\ngit config --global user.name ${GIT_OWNER}\r\ngit config --global user.email ${GIT_EMAIL}\r\ngit repo-config core.sharedRepository true\r\ngit add .\r\ngit commit -m 'initial import'\r\n\r\ncd ${GIT_HOME}\r\nchown -R git:git ${GIT_REPO}\r\nchmod -R 775 ${GIT_REPO}\r\nchmod -R g+ws ${GIT_REPO}\r\nchgrp -R git ${GIT_REPO}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"BARE REPO #!\/bin\/sh GIT_OWNER=\"__PON_TU_NOMBRE__\" GIT_EMAIL=\"__PON_TU_EMAIL\" GIT_HOME=\"__RUTA_ABSOLUTA_HOME_GIT__\" GIT_REPO=$1\".git\" cd ${GIT_HOME} mkdir ${GIT_REPO} cd ${GIT_REPO} git init --bare git config --global user.name ${GIT_OWNER} git config --global user.email ${GIT_EMAIL} git repo-config core.sharedRepository true cd ${GIT_HOME} chown -R git:git ${GIT_REPO} chmod -R 775 ${GIT_REPO} chmod -R g+ws ${GIT_REPO} chgrp -R git ${GIT_REPO} NO BARE REPO #!\/bin\/sh GIT_OWNER=\"__PON_TU_NOMBRE__\" GIT_EMAIL=\"__PON_TU_EMAIL\" GIT_HOME=\"__RUTA_ABSOLUTA_HOME_GIT__\" GIT_REPO=$1\".git\" cd ${GIT_HOME} mkdir ${GIT_REPO}&nbsp;<a href=\"https:\/\/hosting.airetech.es\/blog\/wiki\/script-para-automatizar-la-creacion-de-repositorios-git\/\" class=\"read-more\">Seguir leyendo<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,6],"tags":[158,156,216,157],"class_list":["post-2238","post","type-post","status-publish","format-standard","hentry","category-linux","category-wiki","tag-bare","tag-git","tag-linux","tag-repo","cat-10-id","cat-6-id"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/comments?post=2238"}],"version-history":[{"count":5,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions"}],"predecessor-version":[{"id":2331,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/posts\/2238\/revisions\/2331"}],"wp:attachment":[{"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/media?parent=2238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/categories?post=2238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.airetech.es\/blog\/wp-json\/wp\/v2\/tags?post=2238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}