[{"data":1,"prerenderedAt":668},["ShallowReactive",2],{"/ja-jp/blog/categories/open-source":3,"navigation-ja-jp":21,"banner-ja-jp":420,"footer-ja-jp":430,"open-source-category-page-total-items-ja-jp":636,"open-source-category-page-featured-ja-jp":637,"open-source-category-page-3-ja-jp":667},{"id":4,"title":5,"body":6,"category":6,"config":7,"content":11,"description":6,"extension":13,"meta":14,"navigation":15,"path":16,"seo":17,"slug":6,"stem":19,"testContent":6,"type":6,"__hash__":20},"blogCategories/ja-jp/blog/categories/open-source.yml","Open Source",null,{"template":8,"slug":9,"hide":10},"BlogCategory","open-source",false,{"name":12},"オープンソース","yml",{},true,"/ja-jp/blog/categories/open-source",{"title":12,"description":18},"Browse articles related to オープンソース on the GitLab Blog","ja-jp/blog/categories/open-source","LCQ49rG9L1fAIcDY77l5gbBeJfk0jZDAh6RiQm8iSEw",{"data":22},{"logo":23,"freeTrial":28,"sales":33,"login":38,"items":43,"search":351,"minimal":384,"duo":401,"pricingDeployment":410},{"config":24},{"href":25,"dataGaName":26,"dataGaLocation":27},"/ja-jp/","gitlab logo","header",{"text":29,"config":30},"無料トライアルを開始",{"href":31,"dataGaName":32,"dataGaLocation":27},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/ja-jp&glm_content=default-saas-trial/","free trial",{"text":34,"config":35},"お問い合わせ",{"href":36,"dataGaName":37,"dataGaLocation":27},"/ja-jp/sales/","sales",{"text":39,"config":40},"サインイン",{"href":41,"dataGaName":42,"dataGaLocation":27},"https://gitlab.com/users/sign_in/","sign in",[44,71,167,172,273,333],{"text":45,"config":46,"cards":48},"プラットフォーム",{"dataNavLevelOne":47},"platform",[49,55,63],{"title":45,"description":50,"link":51},"DevSecOpsに特化したインテリジェントオーケストレーションプラットフォーム",{"text":52,"config":53},"プラットフォームを詳しく見る",{"href":54,"dataGaName":47,"dataGaLocation":27},"/ja-jp/platform/",{"title":56,"description":57,"link":58},"GitLab Duo Agent Platform","ソフトウェアライフサイクル全体を支えるエージェント型AI",{"text":59,"config":60},"GitLab Duoのご紹介",{"href":61,"dataGaName":62,"dataGaLocation":27},"/ja-jp/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":64,"description":65,"link":66},"GitLabが選ばれる理由","エンタープライズがGitLabを選ぶ主な理由をご覧ください",{"text":67,"config":68},"詳細はこちら",{"href":69,"dataGaName":70,"dataGaLocation":27},"/ja-jp/why-gitlab/","why gitlab",{"text":72,"left":15,"config":73,"link":75,"lists":79,"footer":149},"製品",{"dataNavLevelOne":74},"solutions",{"text":76,"config":77},"すべてのソリューションを表示",{"href":78,"dataGaName":74,"dataGaLocation":27},"/ja-jp/solutions/",[80,105,127],{"title":81,"description":82,"link":83,"items":88},"自動化","CI/CDと自動化でデプロイを加速",{"config":84},{"icon":85,"href":86,"dataGaName":87,"dataGaLocation":27},"AutomatedCodeAlt","/ja-jp/solutions/delivery-automation/","automated software delivery",[89,93,96,101],{"text":90,"config":91},"CI/CD",{"href":92,"dataGaLocation":27,"dataGaName":90},"/ja-jp/solutions/continuous-integration/",{"text":56,"config":94},{"href":61,"dataGaLocation":27,"dataGaName":95},"gitlab duo agent platform - product menu",{"text":97,"config":98},"ソースコード管理",{"href":99,"dataGaLocation":27,"dataGaName":100},"/ja-jp/solutions/source-code-management/","Source Code Management",{"text":102,"config":103},"自動化されたソフトウェアデリバリー",{"href":86,"dataGaLocation":27,"dataGaName":104},"Automated software delivery",{"title":106,"description":107,"link":108,"items":113},"セキュリティ","セキュリティを犠牲にすることなくコード作成を高速化",{"config":109},{"href":110,"dataGaName":111,"dataGaLocation":27,"icon":112},"/ja-jp/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[114,118,123],{"text":115,"config":116},"Application Security Testing",{"href":110,"dataGaName":117,"dataGaLocation":27},"Application security testing",{"text":119,"config":120},"ソフトウェアサプライチェーンの安全性",{"href":121,"dataGaLocation":27,"dataGaName":122},"/ja-jp/solutions/supply-chain/","Software supply chain security",{"text":124,"config":125},"Software Compliance",{"href":126,"dataGaName":124,"dataGaLocation":27},"/ja-jp/solutions/software-compliance/",{"title":128,"link":129,"items":134},"測定",{"config":130},{"icon":131,"href":132,"dataGaName":133,"dataGaLocation":27},"DigitalTransformation","/ja-jp/solutions/visibility-measurement/","visibility and measurement",[135,139,144],{"text":136,"config":137},"可視性と測定",{"href":132,"dataGaLocation":27,"dataGaName":138},"Visibility and Measurement",{"text":140,"config":141},"バリューストリーム管理",{"href":142,"dataGaLocation":27,"dataGaName":143},"/ja-jp/solutions/value-stream-management/","Value Stream Management",{"text":145,"config":146},"分析とインサイト",{"href":147,"dataGaLocation":27,"dataGaName":148},"/ja-jp/solutions/analytics-and-insights/","Analytics and insights",{"title":150,"items":151},"GitLabが活躍する場所",[152,157,162],{"text":153,"config":154},"Enterprise",{"href":155,"dataGaLocation":27,"dataGaName":156},"/ja-jp/enterprise/","enterprise",{"text":158,"config":159},"スモールビジネス",{"href":160,"dataGaLocation":27,"dataGaName":161},"/ja-jp/small-business/","small business",{"text":163,"config":164},"公共機関",{"href":165,"dataGaLocation":27,"dataGaName":166},"/ja-jp/solutions/public-sector/","public sector",{"text":168,"config":169},"価格",{"href":170,"dataGaName":171,"dataGaLocation":27,"dataNavLevelOne":171},"/ja-jp/pricing/","pricing",{"text":173,"config":174,"link":176,"lists":180,"feature":260},"関連リソース",{"dataNavLevelOne":175},"resources",{"text":177,"config":178},"すべてのリソースを表示",{"href":179,"dataGaName":175,"dataGaLocation":27},"/ja-jp/resources/",[181,214,232],{"title":182,"items":183},"はじめに",[184,189,194,199,204,209],{"text":185,"config":186},"インストール",{"href":187,"dataGaName":188,"dataGaLocation":27},"/ja-jp/install/","install",{"text":190,"config":191},"クイックスタートガイド",{"href":192,"dataGaName":193,"dataGaLocation":27},"/ja-jp/get-started/","quick setup checklists",{"text":195,"config":196},"学ぶ",{"href":197,"dataGaLocation":27,"dataGaName":198},"https://university.gitlab.com/","learn",{"text":200,"config":201},"製品ドキュメント",{"href":202,"dataGaName":203,"dataGaLocation":27},"https://docs.gitlab.com/","product documentation",{"text":205,"config":206},"ベストプラクティスビデオ",{"href":207,"dataGaName":208,"dataGaLocation":27},"/ja-jp/getting-started-videos/","best practice videos",{"text":210,"config":211},"インテグレーション",{"href":212,"dataGaName":213,"dataGaLocation":27},"/ja-jp/integrations/","integrations",{"title":215,"items":216},"検索する",[217,222,227],{"text":218,"config":219},"お客様成功事例",{"href":220,"dataGaName":221,"dataGaLocation":27},"/ja-jp/customers/","customer success stories",{"text":223,"config":224},"ブログ",{"href":225,"dataGaName":226,"dataGaLocation":27},"/ja-jp/blog/","blog",{"text":228,"config":229},"リモート",{"href":230,"dataGaName":231,"dataGaLocation":27},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":233,"items":234},"つなげる",[235,240,245,250,255],{"text":236,"config":237},"GitLabサービス",{"href":238,"dataGaName":239,"dataGaLocation":27},"/ja-jp/services/","services",{"text":241,"config":242},"コミュニティ",{"href":243,"dataGaName":244,"dataGaLocation":27},"/community/","community",{"text":246,"config":247},"フォーラム",{"href":248,"dataGaName":249,"dataGaLocation":27},"https://forum.gitlab.com/","forum",{"text":251,"config":252},"イベント",{"href":253,"dataGaName":254,"dataGaLocation":27},"/events/","events",{"text":256,"config":257},"パートナー",{"href":258,"dataGaName":259,"dataGaLocation":27},"/ja-jp/partners/","partners",{"backgroundColor":261,"textColor":262,"text":263,"image":264,"link":268},"#2f2a6b","#fff","ソフトウェア開発の未来への洞察",{"altText":265,"config":266},"ソースプロモカード",{"src":267},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758208064/dzl0dbift9xdizyelkk4.svg",{"text":269,"config":270},"最新情報を読む",{"href":271,"dataGaName":272,"dataGaLocation":27},"/ja-jp/the-source/","the source",{"text":274,"config":275,"lists":277},"会社情報",{"dataNavLevelOne":276},"company",[278],{"items":279},[280,285,291,293,298,303,308,313,318,323,328],{"text":281,"config":282},"GitLabについて",{"href":283,"dataGaName":284,"dataGaLocation":27},"/ja-jp/company/","about",{"text":286,"config":287,"footerGa":290},"採用情報",{"href":288,"dataGaName":289,"dataGaLocation":27},"/jobs/","jobs",{"dataGaName":289},{"text":251,"config":292},{"href":253,"dataGaName":254,"dataGaLocation":27},{"text":294,"config":295},"経営陣",{"href":296,"dataGaName":297,"dataGaLocation":27},"/company/team/e-group/","leadership",{"text":299,"config":300},"チーム",{"href":301,"dataGaName":302,"dataGaLocation":27},"/company/team/","team",{"text":304,"config":305},"ハンドブック",{"href":306,"dataGaName":307,"dataGaLocation":27},"https://handbook.gitlab.com/","handbook",{"text":309,"config":310},"投資家向け情報",{"href":311,"dataGaName":312,"dataGaLocation":27},"https://ir.gitlab.com/","investor relations",{"text":314,"config":315},"トラストセンター",{"href":316,"dataGaName":317,"dataGaLocation":27},"/ja-jp/security/","trust center",{"text":319,"config":320},"AI Transparency Center",{"href":321,"dataGaName":322,"dataGaLocation":27},"/ja-jp/ai-transparency-center/","ai transparency center",{"text":324,"config":325},"ニュースレター",{"href":326,"dataGaName":327,"dataGaLocation":27},"/company/contact/#contact-forms","newsletter",{"text":329,"config":330},"プレス",{"href":331,"dataGaName":332,"dataGaLocation":27},"/press/","press",{"text":34,"config":334,"lists":335},{"dataNavLevelOne":276},[336],{"items":337},[338,341,346],{"text":34,"config":339},{"href":36,"dataGaName":340,"dataGaLocation":27},"talk to sales",{"text":342,"config":343},"サポートポータル",{"href":344,"dataGaName":345,"dataGaLocation":27},"https://support.gitlab.com","support portal",{"text":347,"config":348},"カスタマーポータル",{"href":349,"dataGaName":350,"dataGaLocation":27},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":352,"login":353,"suggestions":360},"閉じる",{"text":354,"link":355},"リポジトリとプロジェクトを検索するには、次にログインします",{"text":356,"config":357},"GitLab.com",{"href":41,"dataGaName":358,"dataGaLocation":359},"search login","search",{"text":361,"default":362},"提案",[363,365,370,372,376,380],{"text":56,"config":364},{"href":61,"dataGaName":56,"dataGaLocation":359},{"text":366,"config":367},"コード提案（AI）",{"href":368,"dataGaName":369,"dataGaLocation":359},"/ja-jp/solutions/code-suggestions/","Code Suggestions (AI)",{"text":90,"config":371},{"href":92,"dataGaName":90,"dataGaLocation":359},{"text":373,"config":374},"GitLab on AWS",{"href":375,"dataGaName":373,"dataGaLocation":359},"/ja-jp/partners/technology-partners/aws/",{"text":377,"config":378},"GitLab on Google Cloud",{"href":379,"dataGaName":377,"dataGaLocation":359},"/ja-jp/partners/technology-partners/google-cloud-platform/",{"text":381,"config":382},"GitLabを選ぶ理由",{"href":69,"dataGaName":383,"dataGaLocation":359},"Why GitLab?",{"freeTrial":385,"mobileIcon":389,"desktopIcon":394,"secondaryButton":397},{"text":29,"config":386},{"href":387,"dataGaName":32,"dataGaLocation":388},"https://gitlab.com/-/trials/new/","nav",{"altText":390,"config":391},"GitLabアイコン",{"src":392,"dataGaName":393,"dataGaLocation":388},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":390,"config":395},{"src":396,"dataGaName":393,"dataGaLocation":388},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":182,"config":398},{"href":399,"dataGaName":400,"dataGaLocation":388},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/ja-jp/get-started/","get started",{"freeTrial":402,"mobileIcon":406,"desktopIcon":408},{"text":403,"config":404},"GitLab Duoの詳細について",{"href":61,"dataGaName":405,"dataGaLocation":388},"gitlab duo",{"altText":390,"config":407},{"src":392,"dataGaName":393,"dataGaLocation":388},{"altText":390,"config":409},{"src":396,"dataGaName":393,"dataGaLocation":388},{"freeTrial":411,"mobileIcon":416,"desktopIcon":418},{"text":412,"config":413},"料金ページに戻る",{"href":170,"dataGaName":414,"dataGaLocation":388,"icon":415},"back to pricing","GoBack",{"altText":390,"config":417},{"src":392,"dataGaName":393,"dataGaLocation":388},{"altText":390,"config":419},{"src":396,"dataGaName":393,"dataGaLocation":388},{"title":421,"button":422,"config":427},"エージェント型AIがソフトウェア配信をどのように変革するかをご覧ください",{"text":423,"config":424},"GitLab Transcendを今すぐ視聴",{"href":425,"dataGaName":426,"dataGaLocation":27},"/ja-jp/events/transcend/virtual/","transcend event",{"layout":428,"icon":429,"disabled":15},"release","AiStar",{"data":431},{"text":432,"source":433,"edit":439,"contribute":444,"config":449,"items":454,"minimal":628},"GitはSoftware Freedom Conservancyの商標です。当社は「GitLab」をライセンスに基づいて使用しています",{"text":434,"config":435},"ページのソースを表示",{"href":436,"dataGaName":437,"dataGaLocation":438},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":440,"config":441},"このページを編集",{"href":442,"dataGaName":443,"dataGaLocation":438},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":445,"config":446},"ご協力をお願いします",{"href":447,"dataGaName":448,"dataGaLocation":438},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":450,"facebook":451,"youtube":452,"linkedin":453},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[455,478,532,562,597],{"title":45,"links":456,"subMenu":461},[457],{"text":458,"config":459},"DevSecOpsプラットフォーム",{"href":54,"dataGaName":460,"dataGaLocation":438},"devsecops platform",[462],{"title":168,"links":463},[464,468,473],{"text":465,"config":466},"プランの表示",{"href":170,"dataGaName":467,"dataGaLocation":438},"view plans",{"text":469,"config":470},"Premiumを選ぶ理由",{"href":471,"dataGaName":472,"dataGaLocation":438},"/ja-jp/pricing/premium/","why premium",{"text":474,"config":475},"Ultimateを選ぶ理由",{"href":476,"dataGaName":477,"dataGaLocation":438},"/ja-jp/pricing/ultimate/","why ultimate",{"title":479,"links":480},"ソリューション",[481,486,489,491,496,501,505,508,511,516,518,520,522,527],{"text":482,"config":483},"デジタルトランスフォーメーション",{"href":484,"dataGaName":485,"dataGaLocation":438},"/ja-jp/topics/digital-transformation/","digital transformation",{"text":487,"config":488},"セキュリティとコンプライアンス",{"href":110,"dataGaName":117,"dataGaLocation":438},{"text":102,"config":490},{"href":86,"dataGaName":87,"dataGaLocation":438},{"text":492,"config":493},"アジャイル開発",{"href":494,"dataGaName":495,"dataGaLocation":438},"/ja-jp/solutions/agile-delivery/","agile delivery",{"text":497,"config":498},"クラウドトランスフォーメーション",{"href":499,"dataGaName":500,"dataGaLocation":438},"/ja-jp/topics/cloud-native/","cloud transformation",{"text":502,"config":503},"SCM",{"href":99,"dataGaName":504,"dataGaLocation":438},"source code management",{"text":90,"config":506},{"href":92,"dataGaName":507,"dataGaLocation":438},"continuous integration & delivery",{"text":140,"config":509},{"href":142,"dataGaName":510,"dataGaLocation":438},"value stream management",{"text":512,"config":513},"GitOps",{"href":514,"dataGaName":515,"dataGaLocation":438},"/ja-jp/solutions/gitops/","gitops",{"text":153,"config":517},{"href":155,"dataGaName":156,"dataGaLocation":438},{"text":158,"config":519},{"href":160,"dataGaName":161,"dataGaLocation":438},{"text":163,"config":521},{"href":165,"dataGaName":166,"dataGaLocation":438},{"text":523,"config":524},"教育",{"href":525,"dataGaName":526,"dataGaLocation":438},"/ja-jp/solutions/education/","education",{"text":528,"config":529},"金融サービス",{"href":530,"dataGaName":531,"dataGaLocation":438},"/ja-jp/solutions/finance/","financial services",{"title":173,"links":533},[534,536,538,540,543,545,548,550,552,554,556,558,560],{"text":185,"config":535},{"href":187,"dataGaName":188,"dataGaLocation":438},{"text":190,"config":537},{"href":192,"dataGaName":193,"dataGaLocation":438},{"text":195,"config":539},{"href":197,"dataGaName":198,"dataGaLocation":438},{"text":200,"config":541},{"href":202,"dataGaName":542,"dataGaLocation":438},"docs",{"text":223,"config":544},{"href":225,"dataGaName":226},{"text":546,"config":547},"お客様の成功事例",{"href":220,"dataGaLocation":438},{"text":218,"config":549},{"href":220,"dataGaName":221,"dataGaLocation":438},{"text":228,"config":551},{"href":230,"dataGaName":231,"dataGaLocation":438},{"text":236,"config":553},{"href":238,"dataGaName":239,"dataGaLocation":438},{"text":241,"config":555},{"href":243,"dataGaName":244,"dataGaLocation":438},{"text":246,"config":557},{"href":248,"dataGaName":249,"dataGaLocation":438},{"text":251,"config":559},{"href":253,"dataGaName":254,"dataGaLocation":438},{"text":256,"config":561},{"href":258,"dataGaName":259,"dataGaLocation":438},{"title":563,"links":564},"Company",[565,567,569,571,573,575,577,581,586,588,590,592],{"text":281,"config":566},{"href":283,"dataGaName":276,"dataGaLocation":438},{"text":286,"config":568},{"href":288,"dataGaName":289,"dataGaLocation":438},{"text":294,"config":570},{"href":296,"dataGaName":297,"dataGaLocation":438},{"text":299,"config":572},{"href":301,"dataGaName":302,"dataGaLocation":438},{"text":304,"config":574},{"href":306,"dataGaName":307,"dataGaLocation":438},{"text":309,"config":576},{"href":311,"dataGaName":312,"dataGaLocation":438},{"text":578,"config":579},"Sustainability",{"href":580,"dataGaName":578,"dataGaLocation":438},"/sustainability/",{"text":582,"config":583},"ダイバーシティ、インクルージョン、ビロンギング（DIB）",{"href":584,"dataGaName":585,"dataGaLocation":438},"/ja-jp/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":314,"config":587},{"href":316,"dataGaName":317,"dataGaLocation":438},{"text":324,"config":589},{"href":326,"dataGaName":327,"dataGaLocation":438},{"text":329,"config":591},{"href":331,"dataGaName":332,"dataGaLocation":438},{"text":593,"config":594},"現代奴隷制の透明性に関する声明",{"href":595,"dataGaName":596,"dataGaLocation":438},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"title":34,"links":598},[599,601,606,608,613,618,623],{"text":34,"config":600},{"href":36,"dataGaName":37,"dataGaLocation":438},{"text":602,"config":603},"サポートを受ける",{"href":604,"dataGaName":605,"dataGaLocation":438},"https://support.gitlab.com/hc/en-us/articles/11626483177756-GitLab-Support","get help",{"text":347,"config":607},{"href":349,"dataGaName":350,"dataGaLocation":438},{"text":609,"config":610},"ステータス",{"href":611,"dataGaName":612,"dataGaLocation":438},"https://status.gitlab.com/","status",{"text":614,"config":615},"利用規約",{"href":616,"dataGaName":617,"dataGaLocation":438},"/terms/","terms of use",{"text":619,"config":620},"プライバシーに関する声明",{"href":621,"dataGaName":622,"dataGaLocation":438},"/ja-jp/privacy/","privacy statement",{"text":624,"config":625},"Cookieの設定",{"dataGaName":626,"dataGaLocation":438,"id":627,"isOneTrustButton":15},"cookie preferences","ot-sdk-btn",{"items":629},[630,632,634],{"text":614,"config":631},{"href":616,"dataGaName":617,"dataGaLocation":438},{"text":619,"config":633},{"href":621,"dataGaName":622,"dataGaLocation":438},{"text":624,"config":635},{"dataGaName":626,"dataGaLocation":438,"id":627,"isOneTrustButton":15},19,{"id":638,"title":639,"authorSlugs":640,"body":6,"categorySlug":9,"config":642,"content":645,"description":6,"extension":13,"isFeatured":15,"meta":658,"navigation":15,"path":659,"publishedDate":646,"seo":660,"stem":664,"tagSlugs":665,"__hash__":666},"blogPosts/ja-jp/blog/git-merge-command-overview.yml","Git Merge Command Overview",[641],"gitlab-team",{"featured":15,"template":643,"slug":644},"BlogPost","git-merge-command-overview",{"date":646,"heroImage":647,"title":648,"authors":649,"category":9,"body":651,"description":652,"tags":653},"2025-08-04","https://res.cloudinary.com/about-gitlab-com/image/upload/v1754287290/averr2ecwl01q2f9lknf.jpg","git mergeコマンドの基本を徹底解説",[650],"GitLab Team","## 目次\n\n1. [git mergeとは？](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%81%A8%E3%81%AF%EF%BC%9F)\n2. [git mergeコマンドの基本](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AE%E5%9F%BA%E6%9C%AC)\n3. [マージ先のブランチを準備する](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#%E3%83%9E%E3%83%BC%E3%82%B8%E5%85%88%E3%81%AE%E3%83%96%E3%83%A9%E3%83%B3%E3%83%81%E3%82%92%E6%BA%96%E5%82%99%E3%81%99%E3%82%8B)\n4. [最新のリモートコミットをフェッチする](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#%E6%9C%80%E6%96%B0%E3%81%AE%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%88%E3%82%B3%E3%83%9F%E3%83%83%E3%83%88%E3%82%92%E3%83%95%E3%82%A7%E3%83%83%E3%83%81%E3%81%99%E3%82%8B)\n5. [早送りマージと３ウェイマージ](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#%E6%97%A9%E9%80%81%E3%82%8A%E3%83%9E%E3%83%BC%E3%82%B8%E3%81%A8%EF%BC%93%E3%82%A6%E3%82%A7%E3%82%A4%E3%83%9E%E3%83%BC%E3%82%B8)\n6. [git mergeによるコンフリクトの解決](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%81%AB%E3%82%88%E3%82%8B%E3%82%B3%E3%83%B3%E3%83%95%E3%83%AA%E3%82%AF%E3%83%88%E3%81%AE%E8%A7%A3%E6%B1%BA)\n7. [git mergeコマンドのベストプラクティス](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AE%E3%83%99%E3%82%B9%E3%83%88%E3%83%97%E3%83%A9%E3%82%AF%E3%83%86%E3%82%A3%E3%82%B9)\n8. [GitLabでgit mergeを使う](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%AE%E3%83%99%E3%82%B9%E3%83%88%E3%83%97%E3%83%A9%E3%82%AF%E3%83%86%E3%82%A3%E3%82%B9)\n9. [git merge のFAQ](https://about.gitlab.com/ja-jp/blog/git-merge-command-overview/#git-merge%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89-%E3%81%AEfaq)\n\n## git mergeとは？\n\ngit mergeとは、分岐したブランチをmerge（マージ、統合すること）するコマンドのことです。別のリポジトリからの変更を組み込む際にも使われ、git pull（git fetchとgit mergeを組み合わせたもの）の一部としても機能します。チームで開発を実施するときなどにmainブランチから作業用ブランチを作り、テストをしてからマージ、プッシュすることも多いでしょう。\n\nたとえば、main ブランチに基づいて作成された新しいブランチ’feature’があるとします。この feature ブランチを main にマージするのに使われるのがgit mergeコマンドです。\n\n## git mergeコマンドの基本\n\ngit mergeの基本的なコードは次のようになります。\n\n```shell\ngit merge BRANCH_NAME\n```\n\nブランチ名は、取り込みたいブランチの名前を入力します。\n\n一見簡単そうですが、マージをスムーズに実行するにはいくつか準備が必要となりますので、次の章で確認しましょう。\n\n## マージ先のブランチを準備する\n\ngit status を実行して、HEAD が取り込む先のブランチであることを確認します。必要に応じて\n\n```shell\ngit checkout BRANCH_NAME\n```\n\nを実行して、マージする先のブランチに切り替えます。\n\n## 最新のリモートコミットをフェッチする\n\nリモートで変更を加えたら、マージ先ブランチとマージ元ブランチに最新の変更内容を反映させます。その際は、[git fetchとgit pull](https://about.gitlab.com/ja-jp/blog/what-is-the-difference-between-git-fetch-and-git-pull/)を使います。その後、リモートで加えた変更内容がmainブランチに反映されていることを確認します。\n\n## 早送りマージと３ウェイマージ\n\n早送りマージは、ブランチが分岐していない場合にのみ使えるコマンドです。早送りマージでは、マージ自体は行われませんが、ブランチの先頭とブランチの末尾の履歴を結合することで、旧ブランチからアクセスできたコミットが、新ブランチからも利用できるようになります。\n\n強制的に早送りマージを実施する場合は以下のコードを使います（分岐がある場合など早送りマージができない場合にはエラーとなりマージはできません）\n\n```shell\ngit merge --ff-only\n```\n\n一方、ブランチが分岐している場合には、早送りマージを適用することはできず、マージする手段は３ウェイマージに限られます。３ウェイマージは、3 つのコミット （2 つのブランチのそれぞれ先端のコミットと履歴を統合するために生成される専用のコミット）を使用してマージコミットを生成することから来ています。\n\n```shell\ngit checkout BRANCH_NAME\n```\n\nを使うと、早送りマージが可能な時は早送りマージを実施し、できない時に３ウェイマージを実施します。\n\n## git mergeによるコンフリクトの解決\n\nマージの基本を理解すると、同じ箇所を同時に更新してしまったらどうなるのか、という疑問を持たれる方もいるのではないでしょうか。この場合、Git側ではどちらを優先すべきか判断ができず、手作業でコンフリクトを解決することを求めます。\n\nエラーメッセージは次のように表示されます。\n\n```shell\ngit merge BRANCH_NAME\nAuto-merging index.html\nCONFLICT (content): Merge conflict in index.html\nAutomatic merge failed; fix conflicts and then commit the result.\n```\n\nコンフリクトを解決するまで、処理は中断されます。どのファイルでコンフリクトが発生してマージできなかったのを確認するにはgit status を実行します。\n\n```shell\ngit status\n```\n\n未解決のコンフリクトについては unmerged として表示されます。標準的なコンフリクトマーカーがファイルに追加されるため、該当ファイルから修正できます。git addを実行して、コンフリクトが解決したことを Git に通知します。続いて通常の git commit を実行してマージ コミットを生成します。\n\n## git mergeコマンドのベストプラクティス\n\ngit mergeコマンドでよく起こる問題として、他のデベロッパーが加えた変更を破棄してしまうことが挙げられます。個々人がこまめにgit mergeを実行することで、変更を破棄してしまう問題は避けることができますが、マージそのもののコストが膨れ上がる可能性があります。複雑なコンフリクトが出ない場合に自動マージしてくれるようなツールの導入は、git mergeを使うチームの大きな手助けになるはずです。\n\n## GitLabでgit mergeを使う\n\ngit mergeのベストプラクティスとしてツールの使用をおすすめしましたが、[GitLab](https://about.gitlab.com/ja-jp/)なら自動マージ機能のほかにもリモートリポジトリのホスティング、インターフェースの提供、変更内容のコードレビュー、プッシュされたコードの自動ビルド、テスト、デプロイまでを一括で管理できます。\n\ngit mergeで起きるコンフリクトを自動で解決できるGitLabの無料トライアルは[こちら](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/ja-jp/&glm_content=default-saas-trial)からお申し込みいただけます。\n\n## git mergeコマンド のFAQ\n\n### git mergeコマンドとは何ですか？\n\ngit mergeとは、分岐したブランチをmerge（マージ、統合すること）するコマンドのことです。\n\n### mainブランチにマージするにはどうしたらいいですか？\n\nまず、\u003Ccode>git checkout BRANCH_NAME\u003C/code>を使ってmainブランチに移動します。\n\n次に\u003Ccode>git merge BRANCH_NAME\u003C/code>を使ってマージしたいブランチを指定します。\n\nマージ先ブランチ名）master\\\nマージするブランチ名）feature1の場合には\n\n```xml\n\u003Ccode>git checkout master\u003C/code>\n\u003Ccode>git merge feature1\u003C/code>\n```\n\n\\\nとなります。\n\n### git mergeとgit rebaseの違いは何ですか？\n\ngit mergeとgit rebaseはどちらもブランチを結合するコマンドです。mergeが新しいコミットを生成してコミット履歴が分散してしまうのに対し、rebaseはコミット履歴をひとつのブランチにまとめます。rebaseはログを整理する目的で使われることが多いですが、別のブランチで他のメンバーが加えた変更の履歴を消してしまう可能性などがあるので、上級者向けのコマンドといえます。\n\n*監修：知念 梨果* *[@rikachinen](https://gitlab.com/rikachinen)（GitLab合同会社 カスタマーサクセス本部 カスタマーサクセスエンジニア）*\n","この記事では、git mergeコマンドについてコマンドの基本的な使い方からリクエストコードまで解説します。",[654,655,656,657],"collaboration","git","tutorial","workflow",{},"/ja-jp/blog/git-merge-command-overview",{"config":661,"title":662,"description":663,"ogImage":647},{"noIndex":10},"git mergeコマンドの基本を徹底解説 | GitLab","git merge コマンドについてコマンドの基本的な使い方からリクエストコードまで解説します。","ja-jp/blog/git-merge-command-overview",[654,655,656,657],"Os38_u38TZguJSsxURHxxRZkxVVHgmmGuNVOd3wka2I",[],1773871274745]