{"id":2799,"date":"2015-01-20T15:31:03","date_gmt":"2015-01-20T06:31:03","guid":{"rendered":"http:\/\/aatljapan.wpengine.com\/?p=2799"},"modified":"2015-01-21T11:58:48","modified_gmt":"2015-01-21T02:58:48","slug":"git-merge-distinct-octopus-merge","status":"publish","type":"post","link":"https:\/\/www.atlassian.com\/ja\/blog\/git-merge-distinct-octopus-merge","title":{"rendered":"git merge-distinct: octopus-merge \u3067\u8907\u6570\u30d6\u30e9\u30f3\u30c1\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3059\u308b"},"content":{"rendered":"<p><a href=\"https:\/\/www.npmjs.com\/package\/git-merge-distinct\"><tt>git merge-distinct<\/tt><\/a> \u3068\u306f\u3001git \u306e <tt>octopus-merge<\/tt>\u00a0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5909\u66f4\u70b9\u304c\u4e92\u3044\u306b\u7af6\u5408\u3057\u306a\u3044\u8907\u6570\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u5358\u4e00\u306e HEAD \u306b\u30de\u30fc\u30b8\u3067\u304d\u308b\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002\u306a\u305c\u3001\u3053\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u5fc5\u8981\u306a\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u305d\u308c\u306f\u3001\u5358\u4e00\u306e\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30d6\u30e9\u30f3\u30c1\u306b\u304a\u3051\u308b\u72ec\u7acb\u3057\u305f\u958b\u767a\u304c\u4fbf\u5229\u3067\u3042\u308b\u4e00\u65b9\u3001\u30c6\u30b9\u30c8\u3084\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u5411\u3051\u30c7\u30d7\u30ed\u30a4\u3092\u5411\u3051\u306b\u8907\u6570\u30d6\u30e9\u30f3\u30c1\u3092\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u6709\u76ca\u306a\u5834\u5408\u3082\u591a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n<p>\u8ad6\u7406\u7684\u3042\u308b\u3044\u306f\u6587\u5b57\u901a\u308a\u306e\u7af6\u5408\u304c\u8d77\u3053\u308a\u5f97\u308b\u305f\u3081\u3001\u3053\u306e\u6226\u7565\u304c\u5168\u3066\u306e\u30d6\u30e9\u30f3\u30c1\u3067\u5229\u7528\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u3053\u308c\u304c\u975e\u5e38\u306b\u4fbf\u5229\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u304c\u3044\u304f\u3064\u304b\u5b58\u5728\u3057\u307e\u3059\u3002\u73fe\u306b\u3001\u3042\u306a\u305f\u306f\u4eca\u305d\u308c\u3092\u898b\u3066\u3044\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2 id=\"our-developer-blog\">\u79c1\u305f\u3061\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30d6\u30ed\u30b0<\/h2>\n<p>\u30a2\u30c8\u30e9\u30b7\u30a2\u30f3\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30d6\u30ed\u30b0 (<a href=\"https:\/\/developer.atlassian.com\/\" target=\"_blank\">Atlassian Devlopers<\/a>) \u306b\u306f\u3001\u4e8c\u3064\u306e\u74b0\u5883\u304c\u3042\u308a\u307e\u3059\u3002\u4e00\u3064\u306f\u3001\u4eca\u3042\u306a\u305f\u304c\u898b\u3066\u3044\u308b\u672c\u756a\u74b0\u5883\u3001\u3082\u3046\uff11\u3064\u306f\u3001\u4e3b\u306b\u30ec\u30d3\u30e5\u30fc\u5411\u3051\u306b\u4f7f\u7528\u3055\u308c\u308b\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u74b0\u5883\u3067\u3059\u3002\u79c1\u305f\u3061\u306f\u3001\u81ea\u793e\u306e\u30d6\u30ed\u30b0\u3092\u30b3\u30fc\u30c9\u306b\u3088\u3046\u306b\u6271\u3063\u3066\u3044\u307e\u3059\u3002\u5373\u3061\u3001\u5404\u8a18\u4e8b\u306f\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30d6\u30e9\u30f3\u30c1\u4e0a\u3067\u66f8\u304b\u308c\u3001\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u30ec\u30d3\u30e5\u30fc\u3055\u308c\u308b\u306e\u3067\u3059\u3002\u307e\u305f\u3001\u79c1\u305f\u3061\u306f\u30d6\u30e9\u30f3\u30c1\u30ec\u30d9\u30eb\u3067\u7d99\u7d9a\u7684\u30c7\u30d7\u30ed\u30a4\u30e1\u30f3\u30c8\u3092\u5b9f\u8df5\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30d5\u30a3\u30fc\u30c1\u30e3\u30fc\u30d6\u30e9\u30f3\u30c1\u304c\u4f5c\u6210\u3042\u308b\u3044\u306f\u66f4\u65b0\u3055\u308c\u308b\u5ea6\u306b\u3001<a href=\"http:\/\/www.atlassian.com\/ja\/software\/bamboo\">Bamboo<\/a> \u30b5\u30fc\u30d0\u30fc\u304c\u30b5\u30a4\u30c8\u3092\u518d\u69cb\u7bc9\u3057\u3066\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3059\u3002\u30ec\u30d3\u30e5\u30a2\u30fc\u304c\u3001\u751f\u306e\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3067\u306f\u306a\u304f\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305f\u3082\u306e\u3092\u8aad\u3081\u308b\u3088\u3046\u306b\u3001\u30d7\u30eb\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u306f\u30d6\u30ed\u30b0\u306e\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30ea\u30f3\u30af\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"big-image\" style=\"width: 70%; text-align: center;\"><a href=\"http:\/\/aatljapan.wpengine.com\/files\/rendered.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2800 size-full\" src=\"http:\/\/aatljapan.wpengine.com\/files\/rendered-e1421643623607.png\" alt=\"rendered\" width=\"630\" height=\"454\" \/><\/a><br \/>\n<em>\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u6e08 vs. \u751f\u306e\u30de\u30fc\u30af\u30c0\u30a6\u30f3<\/em><\/div>\n<p>\u3053\u308c\u306f\u3001\u5f0a\u793e\u306e\u30d6\u30ed\u30b0\u306e\u57f7\u7b46\u8005\u304c\u5897\u52a0\u3057\u305f\u3053\u3068\u3067\u3001\u8907\u6570\u306e\u8a18\u4e8b\u304c\u540c\u6642\u306b\u57f7\u7b46\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u306f\u3001\u898b\u4e8b\u306b\u6a5f\u80fd\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u5358\u4e00\u306e\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u3068\u8907\u6570\u306e\u30d6\u30e9\u30f3\u30c1\u3067\u306f\u3001\u4e00\u756a\u6700\u5f8c\u306b\u4fee\u6b63\u3055\u308c\u305f\u30d6\u30e9\u30f3\u30c1\u304c\u30b5\u30fc\u30d0\u30fc\u306b\u30c7\u30d7\u30ed\u30a4\u3055\u308c\u308b\u3068\u3044\u3046\u300c\u6700\u5f8c\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3082\u306e\u52dd\u3061\u300d\u30b2\u30fc\u30e0\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3059\u3002\u3042\u306a\u305f\u306e\u30d6\u30e9\u30f3\u30c1\u304c\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u3066\u30ec\u30d3\u30e5\u30fc\u5f85\u3061\u3060\u3068\u3057\u305f\u3089\u3001\u305d\u308c\u306f\u6b8b\u5ff5\uff01\u6b21\u306e\u30d7\u30c3\u30b7\u30e5\u3067\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3059:<\/p>\n<div class=\"big-image\"><a href=\"http:\/\/aatljapan.wpengine.com\/files\/clobbering-e1421643913809.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2801\" src=\"http:\/\/aatljapan.wpengine.com\/files\/clobbering-e1421643913809.png\" alt=\"clobbering\" width=\"650\" height=\"364\" \/><\/a><\/div>\n<p>\u3053\u308c\u306f\u3001\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u305f\u8a18\u4e8b\u3078\u306e\u30ea\u30f3\u30af\u304c\u57fa\u672c\u7684\u306b 404 \u30da\u30fc\u30b8\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u30ec\u30d3\u30e5\u30a2\u30fc\u306f\u30ed\u30fc\u30ab\u30eb\u306b\u7279\u5b9a\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u69cb\u7bc9\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u306e\u3067\u3059\u3002\u30b5\u30a4\u30c8\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u69cb\u7bc9\u3059\u308b\u3068\u306a\u308b\u3068\u3001\u6642\u9593\u304c\u975e\u5e38\u306b\u304b\u304b\u308b\u4e0a\u3001\u4e00\u90e8\u306e\u6280\u8853\u306b\u9577\u3051\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u306f\u30ec\u30d3\u30e5\u30fc\u30d7\u30ed\u30bb\u30b9\u3078\u53c2\u52a0\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u79c1\u306e\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u305f\u8a18\u4e8b\u304c\u540c\u50da\u306b\u3088\u3063\u3066\u6700\u5f8c\u306b\u4e0a\u66f8\u304d\u3055\u308c\u305f\u6642\u3001\u79c1\u306f\u3044\u3044\u52a0\u6e1b\u3001\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u79c1\u306f\u3001\u81ea\u5206\u306e\u8a18\u4e8b\u304c\u5e38\u306b\u30ec\u30d3\u30e5\u30fc\u5411\u3051\u306b\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u30013 \u3064\u306e\u89e3\u6c7a\u7b56\u3092\u8003\u3048\u51fa\u3057\u305f\u306e\u3067\u3059:<\/p>\n<h3 id=\"option-1-stand-up-a-new-staging-server-for-each-branch\">\u30aa\u30d7\u30b7\u30e7\u30f3 1: \u5404\u30d6\u30e9\u30f3\u30c1\u5411\u3051\u306b\u3001\u65b0\u305f\u306a\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b<\/h3>\n<p>\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u304c\u8907\u6570\u3042\u308c\u3070 (\u5404\u30d6\u30e9\u30f3\u30c1\u306b\u4e00\u3064\u305a\u3064)\u3001\u4e92\u3044\u306e\u5909\u66f4\u3092\u4e0a\u66f8\u304d\u3059\u308b\u4e8b\u614b\u304c\u7121\u304f\u306a\u308a\u307e\u3059:<\/p>\n<div class=\"big-image\"><a href=\"http:\/\/aatljapan.wpengine.com\/files\/multi-staging-e1421643953889.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2802\" src=\"http:\/\/aatljapan.wpengine.com\/files\/multi-staging-e1421643953889.png\" alt=\"multi-staging\" width=\"650\" height=\"367\" \/><\/a><\/div>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u3067\u306f\u77ac\u304f\u9593\u306bAWS\u306e\u8acb\u6c42\u66f8\u304c\u81a8\u308c\u4e0a\u304c\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<tt>git branch --no-merge<\/tt><br \/>\n\u3067\u306f\u3001\u4ed6\u306b 8 \u3064\u306e\u30d6\u30ed\u30b0\u304c\u958b\u767a\u4e2d\u3067\u3042\u308b\u3053\u3068\u304c\u793a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u73fe\u6642\u70b9\u3067\u306e\u30d6\u30ed\u30b0\u57f7\u7b46\u8005\u306b\u5bfe\u5fdc\u3059\u308b\u3060\u3051\u3067\u3082 <strong>8 \u3064<\/strong> \u306e\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<h3 id=\"option-2-write-a-script-that-continually-pushes-updates-to-my-branch\">\u30aa\u30d7\u30b7\u30e7\u30f3 2: \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u7d99\u7d9a\u7684\u306b<em>\u79c1\u306e<\/em> \u30d6\u30e9\u30f3\u30c1\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304f<\/h3>\n<p>\u4f55\u5ea6\u3082\u983b\u7e41\u306b\u30d7\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308c\u3070\u3001\u4ed6\u4eba\u306e\u5909\u66f4\u3092\u4e0a\u66f8\u304d\u3067\u304d\u307e\u3059\u3088\u306d\uff01\u30e0\u30cf\u30cf\u30cf\u30cf\u30cf\u30cf\uff01<\/p>\n<div class=\"big-image\"><a href=\"http:\/\/aatljapan.wpengine.com\/files\/insta-clobber-e1421643991287.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2803\" src=\"http:\/\/aatljapan.wpengine.com\/files\/insta-clobber-e1421643991287.png\" alt=\"insta-clobber\" width=\"650\" height=\"405\" \/><\/a><\/div>\n<p>\u3053\u306e\u65b9\u6cd5\u3067\u3042\u308c\u3070\u3001<em>\u79c1\u306e<\/em> \u554f\u984c\u306f\u7c21\u5358\u304b\u3064\u7d20\u65e9\u304f\u89e3\u6c7a\u3067\u304d\u308b\u3082\u306e\u306e\u3001\u3053\u308c\u306f\u660e\u3089\u304b\u306b\u79c1\u305f\u3061\u306e <a href=\"https:\/\/www.atlassian.com\/ja\/company\/about\/values\">4 \u3064\u3081\u306e\u30b3\u30a2\u30d0\u30ea\u30e5\u30fc<\/a>\u306b\u9055\u53cd\u3057\u3066\u3044\u307e\u3059\u3002\u7387\u76f4\u306b\u8a00\u3046\u306a\u3089\u3070\u3001\u304b\u306a\u308a\u30e0\u30ab\u3064\u304f\u884c\u70ba\u3067\u3059\u3002<\/p>\n<h3 id=\"option-3-octopus-merge-the-branches-then-stage-the-result\">\u30aa\u30d7\u30b7\u30e7\u30f3 3: \u30d6\u30e9\u30f3\u30c1\u3092\u30aa\u30af\u30c8\u30d1\u30b9\u30de\u30fc\u30b8\u3057\u3066\u3001\u7d50\u679c\u3092\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3059\u308b<\/h3>\n<p>Git \u304c\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b <tt>octopus-merge<\/tt> \u3068\u3044\u3046\u30de\u30fc\u30b8\u6226\u7565\u3067\u306f\u3001\u4e8c\u3064\u4ee5\u4e0a\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u30de\u30fc\u30b8\u3067\u304d\u307e\u3059 (\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u3001<a href=\"http:\/\/marc.info\/?l=linux-kernel&amp;m=139033182525831\"><em>\u305d\u308c\u4ee5\u4e0a<\/em>\u591a\u304f\u3082\u53ef\u80fd<\/a>)\u3002\u79c1\u306f\u3001\u672a\u51e6\u7406\u306e\u30d6\u30e9\u30f3\u30c1\u304c\u4e00\u3064\u4ee5\u4e0a\u3042\u308b\u5834\u5408\u306f\u3001\u305d\u308c\u3089\u3092\u30de\u30fc\u30b8\u3057\u3066\u3001\u305d\u306e\u7d50\u679c\u3092\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d0\u30fc\u306b\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u308b\u306f\u305a\u3060\u3068\u8003\u3048\u305f\u306e\u3067\u3059:<\/p>\n<div class=\"big-image\"><a href=\"http:\/\/aatljapan.wpengine.com\/files\/merge-before-deploy-e1421644033990.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2804\" src=\"http:\/\/aatljapan.wpengine.com\/files\/merge-before-deploy-e1421644033990.png\" alt=\"merge-before-deploy\" width=\"650\" height=\"357\" \/><\/a><\/div>\n<p>\u30d1\u30c3\u3068\u898b\u306f\u8907\u96d1\u305d\u3046\u3067\u3059\u304c\u3001\u30aa\u30af\u30c8\u30d1\u30b9\u30de\u30fc\u30b8\u306e\u5b9f\u884c\u306f\u6bd4\u8f03\u7684\u5358\u7d14\u3067\u3059 (\u30b3\u30de\u30f3\u30c9\u306f\u3001\u5358\u306b<tt>git merge &lt;branch0&gt; &lt;branch1&gt;.. &lt;branchN&gt;<\/tt>)\u3002\u3057\u304b\u3057\u3001\u79c1\u305f\u3061\u306e\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30d6\u30ed\u30b0\u306e\u30b1\u30fc\u30b9\u306b\u95a2\u3057\u3066\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u7279\u5225\u306a\u8981\u4ef6\u304c\u5b58\u5728\u3057\u307e\u3059:<\/p>\n<ol>\n<li>\u30de\u30fc\u30b8\u306f\u3001<strong>\u7d76\u5bfe\u306b\u7af6\u5408\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093<\/strong>\u3002\u3053\u306e\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u30b8\u30e7\u30d6\u306f\u975e\u5bfe\u8a71\u578b\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u8ab0\u3082\u305d\u308c\u3092\u89e3\u6c7a\u3067\u304d\u308b\u4eba\u304c\u3044\u307e\u305b\u3093\u3002<\/li>\n<li>\u30de\u30fc\u30b8\u306b\u542b\u307e\u308c\u308b\u30d6\u30e9\u30f3\u30c1\u306f\u3001<strong><em>\u9759\u7684<\/em>\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u5909\u66f4\u3059\u308b\u3082\u306e\u3060\u3051<\/strong>\u306b\u3057\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002\u30b3\u30fc\u30c9\u306f\u3001\u81ea\u52d5\u7684\u306b\u30de\u30fc\u30b8\u3059\u308b\u306b\u306f\u5371\u967a\u3059\u304e\u307e\u3059\u3002git \u304c\u8a8d\u8b58\u3059\u308b\u5f62\u3067\u5909\u66f4\u70b9\u304c\u7af6\u5408\u3057\u306a\u3044\u5834\u5408\u3067\u3082\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u306e\u5931\u6557\u3082\u3057\u304f\u306f\u308f\u305a\u304b\u306a\u30d0\u30b0\u304c\u539f\u56e0\u3068\u306a\u3063\u3066\u3001\u8ad6\u7406\u7684\u7af6\u5408\u306b\u9665\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li>\u3042\u306a\u305f\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u3001\u307e\u3060\u30ec\u30d3\u30e5\u30fc\u5411\u3051\u306b\u6e96\u5099\u304c\u6574\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u3001<strong>\u30de\u30fc\u30b8\u304b\u3089\u30aa\u30d7\u30c8\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5<\/strong> \u304c\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/li>\n<li>\u79c1\u305f\u3061\u306e\u30d3\u30eb\u30c9\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u5bfe\u3057\u3066\u76f4\u63a5\u306e\u89e3\u6c7a\u7b56\u3092\u8b1b\u3058\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u5c06\u6765\u306e\u985e\u4f3c\u3057\u305f\u554f\u984c\u3092\u89e3\u6c7a\u3067\u304d\u308b<strong>\u6c4e\u7528\u30c4\u30fc\u30eb<\/strong> \u3092\u69cb\u7bc9\u3057\u305f\u3044\u306e\u3067\u3059\u3002<\/li>\n<\/ol>\n<p>\u3053\u308c\u3089\u306e\u8981\u4ef6\u3092\u5ff5\u982d\u306b\u3001\u79c1\u306f <a href=\"https:\/\/www.npmjs.com\/package\/git-merge-distinct\"><tt>git merge-distinct<\/tt><\/a> \u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u66f8\u304f\u306b\u306f\u8907\u96d1\u6027\u304c\u79c1\u306e\u8a31\u5bb9\u7bc4\u56f2\u3092\u8d85\u3048\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u308c\u306f Node.js \u3067\u66f8\u304b\u308c\u3001npm \u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5f15\u6570\u629c\u304d\u3067\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001\u3042\u306a\u305f\u306e\u73fe\u884c\u306e HEAD \u304a\u3088\u3073\u975e\u7af6\u5408\u306e\u5909\u66f4\u3092\u542b\u3080\u30ec\u30dd\u30b8\u30c8\u30ea\u5185\u306e\u305d\u306e\u4ed6\u5168\u3066\u306e\u30ed\u30fc\u30ab\u30eb\u30d6\u30e9\u30f3\u30c1\u304b\u3089\u3001\u65b0\u305f\u306a\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059:<\/p>\n<div class=\"codecolorer-container text mac-classic\" style=\"overflow: auto; white-space: nowrap; width: 600px;\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<br \/>\n9<br \/>\n10<br \/>\n11<br \/>\n12<br \/>\n13<br \/>\n14<br \/>\n15<br \/>\n16<\/div>\n<\/td>\n<td>\n<div class=\"text codecolorer\">$ git merge-distinct<br \/>\nMerged 3 parents:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;feature\/current-branch<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;feature\/another-branch<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;feature\/yet-another-branch<\/p>\n<p>$ git log -n 1<br \/>\ncommit 2d04b8bd51e3883b0af60defe39a90e568289b1b<br \/>\nMerge: a51aba5 06a467e 8263654<br \/>\nAuthor: Tim Pettersen &lt;tim@atlassian.com&gt;<br \/>\nDate: Tue Jan 13 14:28:03 2015 -0800<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;Merge result of:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feature\/current-branch<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feature\/another-branch<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;feature\/yet-another-branch\n<\/p><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"avoiding-git-conflicts\">git \u7af6\u5408\u306e\u56de\u907f<\/h3>\n<p><tt>git merge-distinct<\/tt> \u304c\u7d76\u5bfe\u306b\u7af6\u5408\u3057\u306a\u3044\u7406\u7531\u3001\u305d\u308c\u306f\u540c\u3058\u30d1\u30b9\u3092\u4fee\u6b63\u3059\u308b\u30d6\u30e9\u30f3\u30c1\u3092\u7d76\u5bfe\u306b\u30de\u30fc\u30b8\u3057\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u5185\u90e8\u3067\u306f\u00a0<tt>git branch --no-merge<\/tt> \u3092\u5b9f\u884c\u3057\u3066\u3001\u73fe\u884c HEAD \u306b\u3069\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u30de\u30fc\u30b8\u3059\u308b\u304b\u3092\u6c7a\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u7e70\u308a\u8fd4\u3057\u305f\u5f8c\u3001\u540c\u4e00\u30d1\u30b9\u3078\u306e\u5909\u66f4\u3092\u542b\u3080\u5168\u3066\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u7121\u8996\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"avoiding-logical-conflicts\">\u8ad6\u7406\u7684\u7af6\u5408\u306e\u56de\u907f<\/h3>\n<p>\u78ba\u5b9f\u306b\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u307f\u304c\u30de\u30fc\u30b8\u3055\u308c\u308b\u3088\u3046\u3001\u79c1\u306f <tt>--exclude<\/tt> \u3068 <tt>--include<\/tt> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u3066\u3001\u30de\u30fc\u30b8\u5019\u88dc\u3068\u306a\u308b\u30d6\u30e9\u30f3\u30c1\u3067\u5909\u66f4\u53ef\u80fd\u306a\u30d1\u30b9\u3092\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u306f <tt>.js<\/tt> \u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u5207\u5909\u66f4\u305b\u305a\u00a0<tt>app\/posts\/<\/tt> \u4e0b\u306e\u307f\u3092\u5909\u66f4\u3057\u3066\u3044\u308b\u5168\u3066\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u30de\u30fc\u30b8\u3057\u307e\u3059:<\/p>\n<div class=\"codecolorer-container text mac-classic\" style=\"overflow: auto; white-space: nowrap; width: 600px;\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<\/div>\n<\/td>\n<td>\n<div class=\"text codecolorer\">$ git merge-distinct &#8211;include &#8216;app\/posts\/**&#8217; &#8211;exclude &#8216;**\/*.js&#8217;<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 id=\"selectively-merging-branches\">\u30d6\u30e9\u30f3\u30c1\u306e\u9078\u629e\u7684\u30de\u30fc\u30b8<\/h3>\n<p>\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u304c\u3001\u81ea\u5206\u305f\u3061\u306e\u5909\u66f4\u304c\u30de\u30fc\u30b8\u3055\u308c\uff08\u305d\u3057\u3066\u7d50\u679c\u7684\u306b\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3055\u308c\uff09\u308b\u3053\u3068\u304b\u3089\u30aa\u30d7\u30c8\u30a2\u30a6\u30c8\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u5bfe\u8c61\u30d6\u30e9\u30f3\u30c1\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u30e6\u30fc\u30b6\u30fc\u304c\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30d6\u30e9\u30f3\u30c1\u306f <tt>feature\/<\/tt> \u3067\u59cb\u307e\u308b\u5168\u3066\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u30de\u30fc\u30b8\u3057\u307e\u3059:<\/p>\n<div class=\"codecolorer-container text mac-classic\" style=\"overflow: auto; white-space: nowrap; width: 600px;\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<\/div>\n<\/td>\n<td>\n<div class=\"text codecolorer\">$ git merge-distinct &#8216;feature\/**&#8217;<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><tt>git merge-distinct<\/tt> \u306f\u307e\u305f\u3001\u30de\u30fc\u30b8\u30b3\u30df\u30c3\u30c8\u306e\u30ab\u30b9\u30bf\u30e0\u5316\u306b\u95a2\u3059\u308b\u3044\u304f\u3064\u304b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002:<\/p>\n<div class=\"codecolorer-container text mac-classic\" style=\"overflow: auto; white-space: nowrap; width: 600px;\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<br \/>\n9<br \/>\n10<br \/>\n11<br \/>\n12<br \/>\n13<br \/>\n14<\/div>\n<\/td>\n<td>\n<div class=\"text codecolorer\">$ git-merge-distinct &#8211;help<\/p>\n<p>Usage: git merge-distinct [&lt;options&gt;] [&lt;branch glob&gt;]<\/p>\n<p>Options:<\/p>\n<p>-i, &#8211;include &lt;path glob&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;only branches with changes modifying paths<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matching this pattern will be included<br \/>\n-x, &#8211;exclude &lt;path glob&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any branches with changes modifying paths<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matching this pattern will be excluded<br \/>\n-n, &#8211;no-commit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perform the merge but do not autocommit, to give<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the user a chance to inspect and further tweak<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the merge result before committing.<br \/>\n-m, &#8211;message &lt;message&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;override the default commit message<\/p><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u79c1\u305f\u3061\u306f\u3001<a href=\"https:\/\/marketplace.atlassian.com\/plugins\/com.atlassian.bamboo.plugins.bamboo-nodejs-plugin\">Bamboo Node.js plugin<\/a> \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u3092\u30c7\u30d9\u30ed\u30c3\u30d1\u30fc\u30d6\u30ed\u30b0\u306e\u30d3\u30eb\u30c9\u904e\u7a0b\u306b\u7d44\u307f\u8fbc\u307f\u307e\u3057\u305f\u3002\u305d\u306e\u7d50\u679c\u3001\u4e92\u3044\u306e\u5909\u66f4\u3092\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3067\u4e0a\u66f8\u304d\u3059\u308b\u3053\u3068\u304c\u7121\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><tt>git merge-distinct<\/tt> \u306f\u3001\u5168\u4f53\u3042\u308b\u3044\u306f\u90e8\u5206\u7684\u306b\u9759\u7684\u306a\u305d\u306e\u4ed6\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3001\u307e\u305f\u81ea\u52d5\u5316\u306b\u3088\u3063\u3066\u8907\u6570\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u7d44\u5408\u305b\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u3001\u4ed6\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u3082\u6050\u3089\u304f\u6a5f\u80fd\u3059\u308b\u3060\u3051\u306e\u4e00\u822c\u6027\u3092\u5099\u3048\u3066\u3044\u307e\u3059\u3002<a href=\"https:\/\/bitbucket.org\/tpettersen\/git-merge-distinct\">\u30bd\u30fc\u30b9<\/a> \u3092\u78ba\u8a8d\u3059\u308b\u304b\u3001\u3042\u308b\u3044\u306f\u4ee5\u4e0b\u3092\u5229\u7528\u3057\u3066\u30ed\u30fc\u30ab\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059 (git\u3001node.js \u3068 npm \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u3068\u3044\u3046\u60f3\u5b9a):<\/p>\n<div class=\"codecolorer-container text mac-classic\" style=\"overflow: auto; white-space: nowrap; width: 600px;\">\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"line-numbers\">\n<div>1<\/div>\n<\/td>\n<td>\n<div class=\"text codecolorer\">$ npm install -g git-merge-distinct<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>git \u306f\u3001<tt>git<\/tt>\u3067\u59cb\u307e\u308b\u3001\u3042\u306a\u305f\u306e\u30d1\u30b9\u4e0a\u306e\u305d\u306e\u4ed6\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8a8d\u8b58\u3067\u304d\u308b\u305f\u3081\u3001\u901a\u5e38\u306e git \u30b3\u30de\u30f3\u30c9\u540c\u69d8\u306b\u00a0<tt>git merge-distinct<\/tt> \u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3084\u554f\u984c\u3001\u307e\u305f\u3053\u308c\u304c\u6709\u76ca\u3068\u306a\u308b\u305d\u306e\u4ed6\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066\u306f\u3001Twitter (\u79c1\u306f <a href=\"https:\/\/twitter.com\/kannonboy\">@kannonboy<\/a>) \u3067\u79c1\u306b\u304a\u77e5\u3089\u305b\u4e0b\u3055\u3044\u3002<\/p>\n<p><small>*\u672c\u30d6\u30ed\u30b0\u306f Atlassian Developers \u306e\u7ffb\u8a33\u3067\u3059\u3002\u672c\u6587\u4e2d\u306e\u65e5\u6642\u306a\u3069\u306f\u6295\u7a3f\u5f53\u6642\u306e\u3082\u306e\u3067\u3059\u306e\u3067\u3054\u4e86\u627f\u304f\u3060\u3055\u3044\u3002<br \/>\n*\u539f\u6587 : 2015 \u5e74 1 \u6708 15 \u65e5\u6295\u7a3f \"<a href=\"https:\/\/developer.atlassian.com\/blog\/2015\/01\/git-merge-distinct-octopus-merge\/\" target=\"_blank\">git merge-distinct: staging multiple branches with octopus-merge<\/a>\"<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>git merge-distinct \u3068\u306f\u3001git \u306e octopus-merge\u00a0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5909\u66f4\u70b9\u304c\u4e92\u3044\u306b\u7af6\u5408\u3057\u306a\u3044\u8907\u6570\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u5358\u4e00\u306e HEAD \u306b\u30de\u30fc\u30b8\u3067\u304d\u308b\u3001\u3061\u3087&hellip;<\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"bitbucket_subtitle":"","footnotes":""},"categories":[1],"tags":[103],"coauthors":[],"class_list":["post-2799","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-git"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/2799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=2799"}],"version-history":[{"count":0,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/2799\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=2799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=2799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=2799"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.atlassian.com\/ja\/blog\/wp-json\/wp\/v2\/coauthors?post=2799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}