Skip to Content
実用 Git 第3版
book

実用 Git 第3版

by Prem Kumar Ponuthorai, Jon Loeliger, 萬谷 暢崇, 長尾 高弘
March 2024
Intermediate to advanced
576 pages
9h
Japanese
O'Reilly Japan, Inc.
Content preview from 実用 Git 第3版

3章ブランチ

Gitユーザーは、ブランチによってソフトウェアプロジェクト内に新しい開発ラインを立ち上げられるようになる。ブランチを作るとは、プロジェクトのタイムラインに含まれるある特定の状態から分岐を作ることだ。こうすると、開発は同時に複数の方向に進めていけるようになる。これはタイムトラベルと考えることができる。同じ出発点から別のパラレルなタイムラインを作れるということだ。ブランチは、同じプロジェクトのなかで複数の異なるバージョンを作れるようにする。もっとも、ブランチはほかのブランチと調整、マージして、複数の異なる作業の成果を1つにまとめられることが多い。

Gitでは、ブランチの作成は軽くてコストのかからない操作だ。それは、ブランチがGitリポジトリ内の特定のコミットオブジェクトへのポインタにすぎないからである。Gitは多数のブランチを作ることを認めているため、1つのリポジトリのなかに同時に多数の異なる開発ラインが共存できる。さらに、Gitのブランチのマージサポートは1級品だ。そのため、ほとんどのGitユーザーはブランチを日常的に使っており、ブランチの多用は自然な形で奨励されている。

この章では、開発者たちが同じプロジェクトのなかで複数の開発ラインを維持する方法を示すことを通じて、ブランチがGitでどのように機能するかをトップダウンのアプローチで考えていく。この章で説明することは、「2章 基本コンセプト」で学んだことを補完することになる。

この章では、ブランチのリストと内容の表示、選択、作成、削除の方法を示す。また、ブランチが時間の構造を壊し、パラレルなタイムライン†1の存在を台無しにするようなことを防ぐためのベストプラクティスも示す。

[†1] 私たちはタイムトラベルの逆説とタイムトラベルが引き起こす複雑さを意識しているので、タイムラインのことを想像するだけにとどめ、実際のタイムトラベルには踏み込まない。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

John Berryman, Albert Ziegler, 服部 佑樹, 佐藤 直生
入門 Kubernetes

入門 Kubernetes

Kelsey Hightower, Brendan Burns, Joe Beda, 松浦 隼人
Binary Hacks Rebooted ―低レイヤの世界を探検するテクニック89選

Binary Hacks Rebooted ―低レイヤの世界を探検するテクニック89選

河田 旺, 小池 悠生, 渡邉 慶一, 佐伯 学哉, 荒田 実樹, 鈴木 創, 中村 孝史, 竹腰 開, 光成 滋生, hikalium, 浜地 慎一郎

Publisher Resources

ISBN: 9784814400614Publisher Website