{"id":8181,"date":"2022-05-20T06:07:32","date_gmt":"2022-05-19T21:07:32","guid":{"rendered":"https:\/\/yumishin.com\/?p=8181"},"modified":"2022-05-20T06:07:32","modified_gmt":"2022-05-19T21:07:32","slug":"gitignore","status":"publish","type":"post","link":"https:\/\/yumishin.com\/?p=8181","title":{"rendered":"\u5f8c\u304b\u3089gitignore\u3092\u8ffd\u52a0\u3057\u3066\u3001Git\u7ba1\u7406\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u9664\u5916\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h2 id=\"i-0\">\u5f8c\u304b\u3089gitignore\u3092\u8ffd\u52a0\u3057\u3066\u3001Git\u7ba1\u7406\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u9664\u5916\u3059\u308b\u65b9\u6cd5<\/h2>\n<div class=\"pre_tag\"><span><i class=\"fa fa-code\"><\/i> \u30b3\u30fc\u30c9<\/span><\/p>\n<pre><code>\n# backend\u306etmp\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f55\u6545\u304bGit\u306e\u7ba1\u7406\u5bfe\u8c61\u306b\u306a\u3063\u3066\u3044\u3066\u3001\u9664\u5916\u3057\u305f\u3044\u3068\u3059\u308b\n\n# \u5bfe\u8c61\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306bgitignore\u3092\u4f5c\u308b\n$ touch .gitignore\n\n# gitignore\u306b\/tmp\/*\u3092\u8a18\u8f09\u3057\u3066\u30b3\u30df\u30c3\u30c8\u3057\u3066\u304a\u304f\n$ git add .\n$ git commit -m 'add .gitignore' \n\n# \u4eca\u56de\u306e\u3088\u3046\u306b\u5bfe\u8c61\u306e\u30d5\u30a9\u30eb\u30c0\u3084\u30d5\u30a1\u30a4\u30eb\u3092\u5f8c\u304b\u3089\u9664\u5916\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u524a\u9664\u3059\u308b\n$ git rm --cached -r backend\/tmp\n\n# \u3053\u308c\u3067\u7ba1\u7406\u5bfe\u8c61\u304b\u3089\u9664\u5916\u3055\u308c\u305f\u306e\u3067\u3001\u3042\u3068\u306f\u5909\u66f4\u5185\u5bb9\u3092\u30b3\u30df\u30c3\u30c8\n$ git add .\n$ git commit -m 'Exclude backend\/tmp from Git management'\n<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u5f8c\u304b\u3089gitignore\u3092\u8ffd\u52a0\u3057\u3066\u3001Git\u7ba1\u7406\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u9664\u5916\u3059\u308b\u65b9\u6cd5<\/p>\n","protected":false},"author":1,"featured_media":8182,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[256],"tags":[],"class_list":{"0":"post-8181","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-it","8":"entry"},"_links":{"self":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/8181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8181"}],"version-history":[{"count":1,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/8181\/revisions"}],"predecessor-version":[{"id":8183,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/posts\/8181\/revisions\/8183"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=\/wp\/v2\/media\/8182"}],"wp:attachment":[{"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yumishin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}