{"id":7209,"date":"2019-11-20T22:27:19","date_gmt":"2019-11-20T13:27:19","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=7209"},"modified":"2023-05-27T18:59:42","modified_gmt":"2023-05-27T09:59:42","slug":"%e3%80%90git%e3%80%91%e3%83%9e%e3%83%bc%e3%82%b8%e3%81%ab%e9%96%a2%e3%81%99%e3%82%8b%e7%9f%a5%e8%ad%98","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=7209","title":{"rendered":"\u3010Git\u3011\u30de\u30fc\u30b8\u306b\u95a2\u3059\u308b\u77e5\u8b58"},"content":{"rendered":"<h2>\u30de\u30fc\u30b8\u3068\u306f\uff1f<\/h2>\n<p>\u4ed6\u306e\u4eba\u306e\u5909\u66f4\u5185\u5bb9\u3092\u53d6\u308a\u8fbc\u3080\u4f5c\u696d\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u30de\u30fc\u30b8\u4f5c\u696d\u306e\u7a2e\u985e<\/h2>\n<p>\u30de\u30fc\u30b8\u4f5c\u696d\u306b\u306f2\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u3042\u3063\u305f\u30d9\u30fc\u30b9\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30de\u30fc\u30b8\u3092\u884c\u3046\u3002<\/li>\n<li><span style=\"color: #ff0000;\"><strong>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306emaster\u30d6\u30e9\u30f3\u30c1\u306b\u30de\u30fc\u30b8\u3092\u884c\u3046\u3002<\/strong><\/span><\/li>\n<\/ul>\n<h2>\u30de\u30fc\u30b8\u65b9\u6cd5<\/h2>\n<ul>\n<li>\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u3067Git\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u884c\u3046\u65b9\u6cd5<\/li>\n<li>GitHub\u3092\u4f7f\u3063\u3066\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u3063\u3066\u884c\u3046\u65b9\u6cd5<\/li>\n<\/ul>\n<h2>\u30de\u30fc\u30b8\u30b3\u30de\u30f3\u30c9<\/h2>\n<pre class=\"lang:default decode:true\">git checkout \u30de\u30fc\u30b8\u3057\u305f\u3044\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\r\ngit merge &lt;\u30d6\u30e9\u30f3\u30c1\u540d&gt;<\/pre>\n<p>\u3082\u3057\u304f\u306f<\/p>\n<pre class=\"lang:default decode:true\">git checkout \u30de\u30fc\u30b8\u3057\u305f\u3044\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\r\ngit merge &lt;\u30ea\u30e2\u30fc\u30c8\u540d\/\u30d6\u30e9\u30f3\u30c1\u540d&gt;<\/pre>\n<h2>\u30de\u30fc\u30b8\u306e\u7a2e\u985e<\/h2>\n<h3>Fast Foward\uff08\u30d5\u30a1\u30b9\u30c8\u30d5\u30a9\u30ef\u30fc\u30c9\u3001\u65e9\u9001\u308a\u306b\u306a\u308b\u30de\u30fc\u30b8\uff09<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u30d6\u30e9\u30f3\u30c1\u3092\u4ed6\u306e\u8ab0\u304b\u304c\u4fee\u6b63\u3057\u3066\u3044\u3066\u305d\u306e\u4fee\u6b63\u3092\u81ea\u5206\u306e\u30ed\u30fc\u30ab\u30eb\u306e\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u53d6\u308a\u8fbc\u3080\u3053\u3068<\/strong><\/span>\u3067\u3059\u3002\u30de\u30fc\u30b8\u6642\u306b\u65b0\u3057\u304f\u30b3\u30df\u30c3\u30c8\u304c\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067\u306f\u306a\u304f\u3001<span style=\"color: #ff0000;\"><strong>\u4ed6\u306e\u8ab0\u304b\u304c\u30b3\u30df\u30c3\u30c8\u3057\u305f\u5185\u5bb9\u306b\u30b3\u30df\u30c3\u30c8\u306e\u5411\u304d\u5148\u3092\u5909\u3048\u308b\u30de\u30fc\u30b8\u65b9\u6cd5<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u7a2e\u985e\u306e\u30de\u30fc\u30b8\u306e\u5834\u5408\u306f<span style=\"color: #ff0000;\"><strong>\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u4f5c\u6210\u3055\u308c\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<h3>Auto Merge(\u30aa\u30fc\u30c8\u30de\u30fc\u30b8\u3001\u57fa\u672c\u7684\u306a\u30de\u30fc\u30b8)<\/h3>\n<p>\u8907\u6570\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u7d71\u5408\u3057\u3066\u65b0\u3057\u304f\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u3068\u3044\u3046\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u30de\u30fc\u30b8\u3067\u3059\u3002<span style=\"color: #ff0000;\"><strong>Fast Foward\u3068\u7570\u306a\u308a\u65b0\u3057\u304f\u30b3\u30df\u30c3\u30c8\u304c\u3067\u304d\u308b<\/strong><\/span>\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u901a\u5e38\u306e\u30b3\u30df\u30c3\u30c8\u3068\u306e\u9055\u3044\u3068\u3057\u3066\u306f<span style=\"color: #ff0000;\"><strong>\u89aa\u30b3\u30df\u30c3\u30c8\u3092\u4e8c\u3064\uff08\u300c\u30de\u30fc\u30b8\u5143\u30b3\u30df\u30c3\u30c8\u300d\u3068\u300c\u30de\u30fc\u30b8\u5148\u30b3\u30df\u30c3\u30c8\u300d\uff09\u6301\u3063\u3066\u3044\u308b\u70b9<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<h3>\u30b3\u30f3\u30d5\u30ea\u30af\u30c8<\/h3>\n<h2>\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u306e\u30de\u30fc\u30b8\u306e\u65b9\u6cd5<\/h2>\n<p>\u30de\u30fc\u30b8\u306f\u4e0b\u8a183\u3064\u306e\u65b9\u6cd5\u304c\u3042\u308a<span style=\"color: #ff0000;\"><strong>\u72b6\u6cc1\u306b\u3088\u3063\u3066\u9069\u5207\u306a\u30de\u30fc\u30b8\u65b9\u6cd5\u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/strong><\/span><\/p>\n<ul>\n<li>Create a merge commit<\/li>\n<li>Squash and merge\uff08\u30b9\u30ab\u30c3\u30b7\u30e5\uff09<\/li>\n<li>Rebase and merge\uff08\u30ea\u30d9\u30fc\u30b9\uff09<\/li>\n<\/ul>\n<h2>Create a merge commit<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306e\u5168\u30b3\u30df\u30c3\u30c8\u3092\u305d\u306e\u307e\u307e\u30d9\u30fc\u30b9\u30d6\u30e9\u30f3\u30c1\u306b\u30de\u30fc\u30b8\u3057\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u305d\u306e\u969b\u306b\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u300d<\/strong><\/span>\u3068\u3044\u3046\u65b0\u3057\u304f\u30de\u30fc\u30b8\u3092\u8a18\u9332\u3059\u308b\u305f\u3081\u306e\u30b3\u30df\u30c3\u30c8\u3082\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u5c11\u306a\u304f\u3068\u3082\u6163\u308c\u306a\u3044\u3046\u3061\u306f\u3001\u4e09\u3064\u306e\u65b9\u6cd5\u306e\u3046\u3061\u3053\u306e\u30de\u30fc\u30b8\u3092\u4f7f\u3063\u305f\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306e\u7d30\u304b\u3044\u30b3\u30df\u30c3\u30c8\u3082\u542b\u3081\u3066\u5c65\u6b74\u3092\u78ba\u5b9f\u306b\u8a73\u7d30\u306b\u6b8b\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306e\u6570\u304c\u591a\u3044\u3068\u5f8c\u3067\u5c65\u6b74\u304c\u975e\u5e38\u306b\u8907\u96d1\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<h2>Squash and merge(\u30b9\u30ab\u30c3\u30b7\u30e5\uff09<\/h2>\n<p>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u3067\u4f5c\u6210\u3057\u305f\u30b3\u30df\u30c3\u30c8\u3092\u4e00\u3064\u306e\u30b3\u30df\u30c3\u30c8\u306b\u307e\u3068\u3081\u305f\u5f8c\u3067\u30de\u30fc\u30b8\u3057\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u8efd\u5fae\u306a\u4fee\u6b63\u3067\u4f55\u5ea6\u3082\u540c\u3058\u3088\u3046\u306a\u30b3\u30df\u30c3\u30c8\u3092\u3057\u3066\u3057\u307e\u3063\u305f\u5834\u5408<\/strong><\/span>\u3068\u304b\u3067\u5c65\u6b74\u304c\u898b\u306b\u304f\u304f\u306a\u308b\u969b\u306b\u4f7f\u3048\u307e\u3059\u306d\u3002<\/p>\n<p>\u306a\u304a\u3001\u3059\u3067\u306b\u30b3\u30df\u30c3\u30c8\u304c\u30ea\u30e2\u30fc\u30c8\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308b\u5834\u5408\u306f\u4ed6\u306e\u30e1\u30f3\u30d0\u30fc\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3068\u3055\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u6df7\u4e71\u3055\u305b\u3066\u3057\u307e\u3046\u306e\u3067\u3001<span style=\"color: #ff0000;\"><strong>\u57fa\u672c\u7684\u306b\u81ea\u5206\u306e\u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u3042\u308b\u5834\u5408<\/strong><\/span>\u306b\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30d9\u30fc\u30b9\u30d6\u30e9\u30f3\u30c1\u306e\u5c65\u6b74\u304c\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u5358\u4f4d\u3067\u6574\u7406\u3055\u308c\u305f\u5f62\u306b\u306a\u308b\u305f\u3081\u5c65\u6b74\u304c\u304b\u306a\u308a\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306e\u30b3\u30df\u30c3\u30c8\u5358\u4f4d\u3067\u7d30\u304b\u3044\u5c65\u6b74\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u3002<\/li>\n<\/ul>\n<h2>Rebase and merge\uff08\u30ea\u30d9\u30fc\u30b9\uff09<\/h2>\n<p><span style=\"color: #ff0000;\"><strong>\u30d6\u30e9\u30f3\u30c1\u306e\u679d\u5206\u304b\u308c\u5143\u3092\u5909\u66f4\u3059\u308b\u30ea\u30d9\u30fc\u30b9<\/strong><\/span>\u3068\u3044\u3046\u64cd\u4f5c\u3092\u5b9f\u65bd\u3057\u305f\u5f8c\u306b\u30de\u30fc\u30b8\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u30ea\u30d9\u30fc\u30b9\u3092\u884c\u3046\u3068\u6700\u65b0\u306e\u30d9\u30fc\u30b9\u30d6\u30e9\u30f3\u30c1\u304b\u3089<span style=\"color: #ff0000;\"><strong>\u3042\u305f\u304b\u3082\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u3092\u4f5c\u6210\u3057\u305f\u304b\u306e\u3088\u3046\u306a\u5c65\u6b74\u72b6\u614b\u3092\u4f5c\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h3>\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u4eee\u306b\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1\u306e\u6570\u304c\u5897\u3048\u305f\u3068\u3057\u3066\u3082\u30b3\u30df\u30c3\u30c8\u5c65\u6b74\u306f\u5e38\u306b\u4e00\u76f4\u7dda\u306b\u306a\u308a\u898b\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h3>\n<ul>\n<li>\u904e\u53bb\u306e\u30b3\u30df\u30c3\u30c8\u5c65\u6b74\u3092\u6539\u7248\u3059\u308b\u70ba\u30b3\u30df\u30c3\u30c8 ID\u3082\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u70ba\u3001\u666e\u901a\u306e\u65b9\u6cd5\u3067\u306f\u30d7\u30c3\u30b7\u30e5\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u30de\u30fc\u30b8\u3068\u306f\uff1f \u4ed6\u306e\u4eba\u306e\u5909\u66f4\u5185\u5bb9\u3092\u53d6\u308a\u8fbc\u3080\u4f5c\u696d\u306e\u3053\u3068\u3067\u3059\u3002 \u30de\u30fc\u30b8\u4f5c\u696d\u306e\u7a2e\u985e \u30de\u30fc\u30b8\u4f5c\u696d\u306b\u306f2\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002 \u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u3042\u3063\u305f\u30d9\u30fc\u30b9\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30de\u30fc\u30b8\u3092\u884c\u3046\u3002 \u30ed\u30fc\u30ab\u30eb\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30c8\u30d4\u30c3\u30af\u30d6\u30e9\u30f3\u30c1 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[32],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7209"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7209"}],"version-history":[{"count":25,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7209\/revisions"}],"predecessor-version":[{"id":20193,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/7209\/revisions\/20193"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7209"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}