Skip to Main Content
実用 Git 第3版
book

実用 Git 第3版

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

第Ⅱ部Gitの基礎知識

第II部では、Gitがファイルをどのように管理しているかに光を当て、インデックスの重要性とインデックスがこのプロセスにどのように関わっているかを説明し、コミットオブジェクトとブランチがGitリポジトリで果たす重要な役割を詳しく見ていく。

先に進む前に、ここで説明するテーマをこの順序で取り上げていく理由を説明しておきたい。

2.3 Gitの内部動作:コンセプトはどのように機能しているか」では、Gitオブジェクトストアに含まれるオブジェクトの内部構造を詳しく説明した。オブジェクトがどのように作られ、オブジェクト相互のリンクがいつ作られるかを見てみよう。

まず、空のディレクトリを作って、treeコマンドで内容を見てみる。

$ mkdir myrepo && cd myrepo 

$ git status 
fatal: not a git repository (or any of the parent directories): .git
致命的エラー: gitリポジトリではない(親ディレクトリも): .git

$ tree .git 
.git [error opening dir]
.git [ディレクトリオープンエラー]

0 directories, 0 files

このディレクトリはGitリポジトリではないので、.gitディレクトリはない。次に、空のGitリポジトリを初期化し、ディレクトリの内容をもう1度見てみよう。

$ git init -b main 
Initialized empty Git repository in .../myrepo/.git/

$ tree .git  .git ├── HEAD ├── config ├── ...
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.
Start your free trial

You might also like

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

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

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

入門 Kubernetes

Kelsey Hightower, Brendan Burns, Joe Beda, 松浦 隼人
セキュアで信頼性のあるシステム構築 ―Google SREが考える安全なシステムの設計、実装、保守

セキュアで信頼性のあるシステム構築 ―Google SREが考える安全なシステムの設計、実装、保守

Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield, Kuma Arakawa, 渡邉 了介

Publisher Resources

ISBN: 9784814400614Publisher Website