{"id":149,"date":"2012-08-01T10:32:53","date_gmt":"2012-08-01T01:32:53","guid":{"rendered":"http:\/\/www.nukoneko.info\/blog_d\/?p=149"},"modified":"2015-11-04T12:34:50","modified_gmt":"2015-11-04T03:34:50","slug":"github%e3%81%a7%e3%82%88%e3%81%8f%e4%bd%bf%e3%81%86%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89","status":"publish","type":"post","link":"https:\/\/www.nukoneko.info\/blog\/?p=149","title":{"rendered":"Github\u3067\u3088\u304f\u4f7f\u3046\u30b3\u30de\u30f3\u30c9"},"content":{"rendered":"<p>\u30e1\u30e2\u30e1\u30e2&#8230;<br \/>\n\u4fee\u6b63,\u8ffd\u8a18 (2015\u5e7411\u670804\u65e5)<\/p>\n<p><!--more--><br \/>\ngit init<br \/>\n\u3000\u3053\u308c\u3092\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u4f5c\u3089\u308c\u308b<\/p>\n<p>\u3053\u3061\u3089\u3060\u3068\u3001git fetch \u3068\u304b\u3057\u305f\u6642\u306bID\u3068Pass\u306e\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u308b\u3002ssh\u306e\u8a8d\u8a3c\u3092\u4f7f\u3063\u305f\u307b\u3046\u304c\u697d<br \/>\n<del datetime=\"2015-11-04T03:11:55+00:00\">git clone http:\/\/github.com\/\u30e6\u30fc\u30b6\u540d\/\u30ea\u30dd\u30b8\u30c8\u30ea\u540d.git<\/del><br \/>\ngit clone git@github.com\/\u30e6\u30fc\u30b6\u540d\/\u30ea\u30dd\u30b8\u30c8\u30ea\u540d.git<br \/>\n\u3000\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u6307\u5b9a\u3057\u305f\u30ea\u30dd\u30b8\u30c8\u30ea\u304c\u8907\u88fd\u3055\u308c\u308b<\/p>\n<p>git add **<br \/>\n\u30b3\u30df\u30c3\u30c8\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u3076<br \/>\ngit add .<br \/>\n\u3068\u3059\u308b\u3068\u3001\u5909\u66f4\u3055\u308c\u305f\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb<\/p>\n<p>git rm **<br \/>\n\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u524a\u9664\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u3076<\/p>\n<p>git status<br \/>\n\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u66f4\u65b0\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b<br \/>\nmodified ***<br \/>\ndeleted ***<br \/>\n\u3068\u304b\u51fa\u308b\u3002<\/p>\n<p>git config core.filemode false<br \/>\n\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u304c\u5909\u308f\u3063\u305f\u6642\u306e\u7d30\u304b\u3044\u901a\u77e5\u3092\u7121\u8996\u3059\u308b<\/p>\n<p>git commit<br \/>\n\u30b3\u30df\u30c3\u30c8\u3059\u308b<\/p>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6307\u5b9a\u304c\u51fa\u6765\u308b<br \/>\n-a<br \/>\n\u5909\u66f4\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u7684\u306b\u30b3\u30df\u30c3\u30c8\u3059\u308b<br \/>\n\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u306f\u30b3\u30df\u30c3\u30c8\u3055\u308c\u306a\u3044<\/p>\n<p>-m &#8216; \u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8 &#8216;<br \/>\n\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5165\u529b\u6b04\u3092\u8868\u793a\u3055\u305b\u305a\u306b\u76f4\u63a5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u66f8\u3051\u308b\u3002<\/p>\n<p>\u203b git push -f (&#8211;force)<br \/>\n\u3000-f \u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4ed8\u3051\u3066push\u3059\u308b\u3068\u3001\u73fe\u5728\u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5185\u5bb9\u3092\u305d\u306e\u307e\u307e\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u53cd\u6620\u3059\u308b\u3000\u5371\u306a\u3044\u3002<\/p>\n<hr>\n<p>\u4e00\u9023\u306e\u52d5\u4f5c<br \/>\nmaster\u304b\u3089\u65b0\u3057\u304f\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3057\u3001\u5909\u66f4\u3092\u30ea\u30e2\u30fc\u30c8\u306e\u65b0\u3057\u3044\u30d6\u30e9\u30f3\u30c1\u306bpush\u3059\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit fetch -p # \u30ea\u30e2\u30fc\u30c8\u306e\u6700\u65b0\u60c5\u5831\u3092\u5f97\u308b\u3002 -p\u3067remove\u3068\u304b\u3055\u308c\u305f\u30d6\u30e9\u30f3\u30c1\u60c5\u5831\u3082\u5f97\u308b\r\ngit checkout master # master\u306b\u79fb\u52d5\r\ngit pull origin\/master # \u30ea\u30e2\u30fc\u30c8\u306emaster\u306b\u3001\u30ed\u30fc\u30ab\u30eb\u306emaster\u3092\u3042\u308f\u305b\u308b\r\ngit checkout -b \u30d6\u30e9\u30f3\u30c1\u540d # \u6700\u65b0\u306emaster\u304b\u3089\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3059\u308b. \u3064\u3044\u3067\u306b\u30d6\u30e9\u30f3\u30c1\u79fb\u52d5\r\n~~~~ \u3044\u308d\u3044\u308d\u4f5c\u696d\r\ngit add . #\u4f5c\u696d\u5185\u5bb9\u3092add\r\ngit commit -m &quot;\u30b3\u30e1\u30f3\u30c8\u3092\u66f8\u304f&quot;\r\ngit push origin \u30d6\u30e9\u30f3\u30c1\u540d # \u3053\u3053\u3092\u30d6\u30e9\u30f3\u30c1\u540d\u306b\u3059\u308b\u3068\u30ea\u30e2\u30fc\u30c8\u306b\u540c\u540d\u306e\u30d6\u30e9\u30f3\u30c1\u304c\u4f5c\u3089\u308c\u308b\r\n<\/pre>\n<hr>\n<p>\u8907\u6570\u306e\u30b3\u30df\u30c3\u30c8\u3092\u4e00\u3064\u306b\u307e\u3068\u3081\u308b (\u4e00\u3064\u306eIssue\u306e\u30b3\u30df\u30c3\u30c8\u304c\u8907\u6570\u306e\u6642\u3068\u304b)  \u203bmaster\u3068\u304b\u3067\u3084\u308b\u3068\u6b74\u53f2\u304c\u3050\u3061\u3083\u3050\u3061\u3083\u306b\u306a\u308b\u306e\u3067\u5371\u967a<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n## \u73fe\u5728\u306e\u30b3\u30df\u30c3\u30c8\u72b6\u6cc1\r\n\r\n#--------------------------------------------------------\r\n$git log\r\ncommit 2ea5684b3f09e705b3d483bcb67ad1dcc85952f8\r\nAuthor: tlnk &lt;tlnk@nknk&gt;\r\nDate:   Wed Nov 4 12:23:49 2015 +0900\r\n\r\n    third\r\n\r\ncommit 43f8a21250b8ee973f0987659fa794fb0f5c7dca\r\nAuthor: tlnk &lt;tlnk@nknk&gt;\r\nDate:   Wed Nov 4 12:23:06 2015 +0900\r\n\r\n    second\r\n\r\ncommit 4fa01a17e135461975f92210e7c64f032502bf94\r\nAuthor: tlnk &lt;tlnk@nknk&gt;\r\nDate:   Wed Nov 4 12:22:50 2015 +0900\r\n\r\n    first\r\n\r\n#--------------------------------------------------------\r\n## \u3053\u308c\u3089\u306e second \u3068 third \u3092\u3042\u308f\u305b\u308b\r\n\r\n$git rebase -i HEAD~~\r\n## \u3059\u308b\u3068\u30c7\u30d5\u30a9\u30eb\u30c8\u3067vi\u304c\u7acb\u3061\u4e0a\u304c\u308b\r\n#--------------------------------------------------------\r\npick 43f8a21 second\r\npick 2ea5684 third\r\n\r\n# Rebase 4fa01a1..2ea5684 onto 4fa01a1 (2 command(s))\r\n#--------------------------------------------------------\r\n\r\n## squash\u306b\u3059\u308b\r\n\r\n#--------------------------------------------------------\r\npick 43f8a21 second\r\nsquash 2ea5684 third\r\n#--------------------------------------------------------\r\n\r\n## :wq!  (\u4fdd\u5b58\u3057\u3066\u7d42\u4e86)\r\n## \u3068\u3059\u308b\u3068\u65b0\u3057\u3044\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u66f8\u3051\u308b\u306e\u3067\u3001\u9069\u5f53\u306b\u7de8\u96c6\r\n\r\n#--------------------------------------------------------\r\n# This is a combination of 2 commits.\r\n# The first commit's message is:\r\n\r\nsecond\r\n\r\n# This is the 2nd commit message:\r\n\r\nthird\r\n\r\n\u2193\r\n\r\nComposit commit\r\n- second\r\n- third\r\n\r\n#--------------------------------------------------------\r\n## \u3042\u3068\u306f:wq!\u3059\u308b\u3068commit\u5185\u5bb9\u304c\u5909\u308f\u308b\r\n#--------------------------------------------------------\r\n$ git log\r\ncommit 2486f6d667e654f81dabe623ad50282b1e675ac4\r\nAuthor: tlnk &lt;tlnk@nknk&gt;\r\nDate:   Wed Nov 4 12:23:06 2015 +0900\r\n\r\n    second\r\n    \r\n    third\r\n\r\ncommit 4fa01a17e135461975f92210e7c64f032502bf94\r\nAuthor: tlnk &lt;tlnk@nknk&gt;\r\nDate:   Wed Nov 4 12:22:50 2015 +0900\r\n\r\n    first\r\n#--------------------------------------------------------\r\n<\/pre>\n<p>commit\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3082\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u30d9\u30fc\u30b9\u306b\u4f5c\u6210\u3057\u3066\u3044\u305f\u30d6\u30e9\u30f3\u30c1\u3068merge\u3068\u304b\u3059\u308b\u3068<br \/>\nconflict \u3057\u3084\u3059\u3044\u3002\u306a\u3063\u305f\u3089\u9762\u5012\u306a\u306e\u3067\u3088\u304f\u8003\u3048\u3066\u3084\u308d\u3046<\/p>\n<hr>\n<p>\u30e1\u30e2\u30e1\u30e2&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e1\u30e2\u30e1\u30e2&#8230; \u4fee\u6b63,\u8ffd\u8a18 (2015\u5e7411\u670804\u65e5)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-6"],"_links":{"self":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=149"}],"version-history":[{"count":3,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":510,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/149\/revisions\/510"}],"wp:attachment":[{"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nukoneko.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}