{"id":359,"date":"2026-06-13T01:32:24","date_gmt":"2026-06-12T16:32:24","guid":{"rendered":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/?p=359"},"modified":"2026-06-13T01:32:24","modified_gmt":"2026-06-12T16:32:24","slug":"merge_rebase_github-flow","status":"publish","type":"post","link":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/2026\/06\/13\/merge_rebase_github-flow\/","title":{"rendered":"merge\u3068rebase\u306e\u601d\u60f3 \uff06 github flow\u3068\u306f\uff1f"},"content":{"rendered":"<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001GitHub\u3092\u5229\u7528\u3057\u305f\u3046\u3048\u3067\u306e\u30e1\u30e2\u3092\u307e\u3068\u3081\u307e\u3059\u3002<\/p>\n<p><\/p>\n<h2>\u25cf merge \u3068 rebase \u306e\u4f7f\u3044\u5206\u3051\u30e1\u30e2<\/h2>\n<h3>\u25a0 merge<\/h3>\n<ul>\n<li>\u4e3b\u306b\u300c\u4f5c\u696d\u30d6\u30e9\u30f3\u30c1\u3092 main \u306b\u53d6\u308a\u8fbc\u3080\uff08\u5408\u6d41\u3055\u305b\u308b\uff09\u300d\u3068\u304d\u306b\u4f7f\u3046<\/li>\n<li>\u5c65\u6b74\u306f\u305d\u306e\u307e\u307e\u6b8b\u308a\u3001\u5408\u6d41\u70b9\u306b merge commit \u304c\u3067\u304d\u308b<\/li>\n<li>\u30c1\u30fc\u30e0\u958b\u767a\u3084\u30ea\u30e2\u30fc\u30c8\u5171\u6709\u30d6\u30e9\u30f3\u30c1\u3067\u5b89\u5168\u306b\u4f7f\u3048\u308b<\/li>\n<\/ul>\n<pre><code>git checkout \u30de\u30fc\u30b8\u3057\u305f\u3044\u30d6\u30e9\u30f3\u30c1\u5148\r\ngit merge \u30de\u30fc\u30b8\u3057\u305f\u3044\u30d6\u30e9\u30f3\u30c1\u5143<\/code><\/pre>\n<p><\/p>\n<h3>\u25a0 rebase<\/h3>\n<ul>\n<li>\u81ea\u5206\u306e\u4f5c\u696d\u30d6\u30e9\u30f3\u30c1\u306b\u3001\u66f4\u65b0\u3055\u308c\u305f main \u306e\u5909\u66f4\u3092\u53d6\u308a\u8fbc\u307f\u305f\u3044\u3068\u304d\u306b\u4f7f\u3046<\/li>\n<li>\u30b3\u30df\u30c3\u30c8\u5c65\u6b74\u3092\u300c\u6700\u65b0 main \u306e\u4e0a\u306b\u4ed8\u3051\u66ff\u3048\u308b\u300d\u3053\u3068\u3067\u76f4\u7dda\u7684\u306b\u6574\u7406\u3067\u304d\u308b<\/li>\n<li>PR\u524d\u306a\u3069\u3001\u5c65\u6b74\u3092\u304d\u308c\u3044\u306b\u3057\u305f\u3044\u3068\u304d\u306b\u6709\u52b9<\/li>\n<li>\u3059\u3067\u306b\u4ed6\u4eba\u3068\u5171\u6709\u3057\u3066\u3044\u308b\u30d6\u30e9\u30f3\u30c1\u306b\u5bfe\u3057\u3066\u4f7f\u3046\u3068\u5c65\u6b74\u304c\u5909\u308f\u308b\u305f\u3081\u6ce8\u610f\u304c\u5fc5\u8981<\/li>\n<\/ul>\n<p>\u25a0 \u307e\u3068\u3081\uff1a<\/p>\n<ul>\n<li>merge\uff1a\u5b89\u5168\u306b\u5408\u6d41\u3059\u308b\u65b9\u6cd5<\/li>\n<li>rebase\uff1a\u81ea\u5206\u306e\u30d6\u30e9\u30f3\u30c1\u3092\u6574\u7406\u3057\u3066\u304b\u3089\u5408\u6d41\u6e96\u5099\u3059\u308b\u65b9\u6cd5<\/li>\n<\/ul>\n<h2>\u25cf GitHub Flow\uff08\u8907\u6570\u4eba\u958b\u767a\u306e\u6a19\u6e96\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\uff09<\/h2>\n<p>GitHub Flow\u306f\u3001\u8907\u6570\u4eba\u3067\u5b89\u5168\u306b\u958b\u767a\u3059\u308b\u305f\u3081\u306e\u30d6\u30e9\u30f3\u30c1\u904b\u7528\u30eb\u30fc\u30eb\u3067\u3059\u3002<\/p>\n<h3>\u25a0 \u57fa\u672c\u601d\u60f3<\/h3>\n<ul>\n<li>main\u30d6\u30e9\u30f3\u30c1\u306f\u5e38\u306b\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u308b\u72b6\u614b<\/li>\n<li>\u3059\u3079\u3066\u306e\u5909\u66f4\u306ffeature\u30d6\u30e9\u30f3\u30c1\u7d4c\u7531\u3067\u884c\u3046<\/li>\n<li>\u7d71\u5408\u306f\u5fc5\u305aPull Request\uff08PR\uff09\u3092\u901a\u3059<\/li>\n<li>\u30ec\u30d3\u30e5\u30fc\u3068CI:Continuous Integration\uff08\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\uff09\u3092\u901a\u904e\u3057\u3066\u304b\u3089main\u3078\u30de\u30fc\u30b8\u3059\u308b<\/li>\n<\/ul>\n<h3>\u25a0 \u6a19\u6e96\u30d5\u30ed\u30fc<\/h3>\n<h5>\u2460 \u671d\uff1a\u6700\u65b0main\u3092\u53d6\u5f97<\/h5>\n<pre><code>git checkout main\r\ngit pull origin main<\/code><\/pre>\n<h5>\u2461 \u671d\uff1afeature\u30d6\u30e9\u30f3\u30c1\u4f5c\u6210<\/h5>\n<pre><code>git checkout -b feature\/`date %y-%m-%d`<\/code><\/pre>\n<h5>\u2462 \u958b\u767a\u30fb\u30b3\u30df\u30c3\u30c8<\/h5>\n<pre><code>git add .\r\ngit commit -m \"implement login API\"<\/code><\/pre>\n<h5>\u2463 \u5e30\u308a\uff1a\u30ea\u30e2\u30fc\u30c8\u3078push<\/h5>\n<pre><code>git push origin feature\/`date %y-%m-%d`<\/code><\/pre>\n<h5>\u2464 Pull Request\u4f5c\u6210\uff08GitHub\u4e0a\uff09<\/h5>\n<ul>\n<li>feature \u2192 main \u306ePR\u3092\u4f5c\u6210<\/li>\n<li>\u30ec\u30d3\u30e5\u30fc\u4f9d\u983c\u3092\u51fa\u3059<\/li>\n<li>CI\uff08\u30c6\u30b9\u30c8\u30fbLint\u306a\u3069\uff09\u3092\u901a\u3059<\/li>\n<\/ul>\n<h5>\u2465 \u30de\u30fc\u30b8\uff08GitHub\u4e0a\u3067\u5b9f\u884c\uff09<\/h5>\n<ul>\n<li>\u30ec\u30d3\u30e5\u30fcOK\u5f8c\u306bGitHub\u306e\u300cMerge pull request\u300d\u30dc\u30bf\u30f3\u3067\u7d71\u5408<\/li>\n<li>main\u30d6\u30e9\u30f3\u30c1\u306b\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u308b<\/li>\n<\/ul>\n<h5>\u2466 \u30ed\u30fc\u30ab\u30eb\u66f4\u65b0\u30fb\u30d6\u30e9\u30f3\u30c1\u524a\u9664<\/h5>\n<pre><code>git checkout main\r\ngit pull origin main\r\ngit branch -d feature\/`date %y-%m-%d`<\/code><\/pre>\n<h3>\u25a0 \u30de\u30fc\u30b8\u65b9\u5f0f\u306e\u7a2e\u985e<\/h3>\n<ul>\n<li><b>Merge commit<\/b>\uff1a\u5c65\u6b74\u3092\u305d\u306e\u307e\u307e\u5408\u6d41\uff08\u6a19\u6e96\uff09<\/li>\n<li><b>Squash merge<\/b>\uff1a\u30b3\u30df\u30c3\u30c8\u30921\u3064\u306b\u307e\u3068\u3081\u3066\u304b\u3089\u5408\u6d41\uff08\u3088\u304f\u4f7f\u308f\u308c\u308b\uff09<\/li>\n<li><b>Rebase merge<\/b>\uff1a\u5c65\u6b74\u3092\u4e00\u76f4\u7dda\u306b\u3057\u3066\u304b\u3089\u5408\u6d41\uff08\u304d\u308c\u3044\u3060\u304c\u904b\u7528\u306f\u9078\u3076\uff09<\/li>\n<\/ul>\n<h3>\u25a0 \u307e\u3068\u3081<\/h3>\n<ul>\n<li>\u4f5c\u696d\uff1afeature\u30d6\u30e9\u30f3\u30c1<\/li>\n<li>\u7d71\u5408\uff1aPull Request\uff08GitHub\u4e0a\uff09<\/li>\n<li>\u54c1\u8cea\u4fdd\u8a3c\uff1a\u30ec\u30d3\u30e5\u30fc + CI<\/li>\n<li>\u5c65\u6b74\u6574\u7406\uff1a\u5fc5\u8981\u306b\u5fdc\u3058\u3066rebase<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>merge\u3068rebase\u3063\u3066\u3044\u3064\u4f7f\u3046\u306e\uff1fgithub flow\u3063\u3066\u3069\u3046\u3044\u3046\u8003\u3048\u65b9\uff1f<br \/>\n\u8907\u6570\u4eba\u3067\u306e\u4f5c\u696d\u3092\u524d\u63d0\u3068\u3057\u305f\u8003\u3048\u65b9\u306b\u3064\u3044\u3066\u307f\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[1],"tags":[22,26,24,25],"class_list":["post-359","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-git","tag-github-flow","tag-merge","tag-rebase"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":5,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":364,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/posts\/359\/revisions\/364"}],"wp:attachment":[{"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sgt.tailc1292c.ts.net\/wordpress\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}