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版

8章コミットの検索

優れたバージョン管理システムには、リポジトリの「考古学」、すなわち過去の作業を調査するための機能が含まれている。Gitは、リポジトリ内で特定の条件を満たすコミットを探すためのメカニズムを組み込んでいる。

この章では、リポジトリのコミット履歴から特定のコミットとメタデータを探すためのテクニックを3種類説明する。第1のテクニックは非常に堅牢で、検索基準を満たすコミットを探すために役立つ。第2のテクニックはファイルに変更を導入したコミットについての情報を提供する。第3のテクニックは、git logコマンドの一部になっている検索機能を活用するものである。

この章は、Gitでコミットを扱うときの検索スキルを身につけるために役立つだけでなく、見つけたコミットに変更を加える方法を説明する「9章 コミットの書き換え」に自然につながるように作られている。

8.1 git bisectの使い方

git bisectコマンドは、基準を自由に指定して特定のコミットを割り出せる強力なツールである。このコマンドは、何か「間違った」ことや「まずい」ことがリポジトリに影響を与えていることが明らかになったが、コードに問題がなかったときがあったことも間違いないというときに役立つ。たとえば、Linuxカーネルの開発をしていてテストブートが失敗するようになったとする。しかし、1週間前とか前にリリースタグをつけたときといったちょっと前の時点にはブートは間違いなく成功していた。このような場合、リポジトリは既知の「正常」な状態から既知の「異常」な状態に変わっている。

しかし、正常から異常に切り替わったのはいつだろうか。どのコミットが問題点を持ち込んだのだろうか。git bisectは、このような疑問に答えるためのツールとして作られている。 ...

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