-
1. Başlangıç
- 1.1 Sürüm Kontrolü Hakkında
- 1.2 Git'in Kısa Bir Tarihçesi
- 1.3 Git'in Temelleri
- 1.4 Git'in Kurulumu
- 1.5 İlk Ayarlamalar
- 1.6 Yardım Almak
- 1.7 Özet
-
2. Git'in Temelleri
-
3. Git'te Dallanma
- 3.1 Dal Nedir?
- 3.2 Dallanma ve Birleştirmenin Temelleri
- 3.3 Dal Yönetimi
- 3.4 Dallanma İş Akışları
- 3.5 Uzak Uçbirim Dalları
- 3.6 Rebasing ## Zemin, Kök, Temel
- 3.7 Summary
-
4. Git on the Server
- 4.1 The Protocols
- 4.2 Getting Git on a Server
- 4.3 Generating Your SSH Public Key
- 4.4 Setting Up the Server
- 4.5 Public Access
- 4.6 GitWeb
- 4.7 Gitosis
- 4.8 Gitolite
- 4.9 Git Daemon
- 4.10 Hosted Git
- 4.11 Summary
-
5. Distributed Git
- 5.1 Distributed Workflows
- 5.2 Contributing to a Project
- 5.3 Maintaining a Project
- 5.4 Summary
-
6. Git Tools
- 6.1 Revision Selection
- 6.2 Interactive Staging
- 6.3 Stashing
- 6.4 Rewriting History
- 6.5 Debugging with Git
- 6.6 Submodules
- 6.7 Subtree Merging
- 6.8 Summary
-
7. Customizing Git
- 7.1 Git Configuration
- 7.2 Git Attributes
- 7.3 Git Hooks
- 7.4 An Example Git-Enforced Policy
- 7.5 Summary
-
8. Git and Other Systems
- 8.1 Git and Subversion
- 8.2 Migrating to Git
- 8.3 Summary
-
9. Git Internals
- 9.1 Plumbing and Porcelain
- 9.2 Git Objects
- 9.3 Git References
- 9.4 Packfiles
- 9.5 The Refspec
- 9.6 Transfer Protocols
- 9.7 Maintenance and Data Recovery
- 9.8 Summary
9.1 Git Internals - Plumbing and Porcelain
Plumbing and Porcelain
This book covers how to use Git with 30 or so verbs such as checkout, branch, remote, and so on. But because Git was initially a toolkit for a VCS rather than a full user-friendly VCS, it has a bunch of verbs that do low-level work and were designed to be chained together UNIX style or called from scripts. These commands are generally referred to as "plumbing" commands, and the more user-friendly commands are called "porcelain" commands.
The book’s first eight chapters deal almost exclusively with porcelain commands. But in this chapter, you’ll be dealing mostly with the lower-level plumbing commands, because they give you access to the inner workings of Git and help demonstrate how and why Git does what it does. These commands aren’t meant to be used manually on the command line, but rather to be used as building blocks for new tools and custom scripts.
When you run git init in a new or existing directory, Git creates the .git directory, which is where almost everything that Git stores and manipulates is located. If you want to back up or clone your repository, copying this single directory elsewhere gives you nearly everything you need. This entire chapter basically deals with the stuff in this directory. Here’s what it looks like:
$ ls
HEAD
branches/
config
description
hooks/
index
info/
objects/
refs/
You may see some other files in there, but this is a fresh git init repository — it’s what you see by default. The branches directory isn’t used by newer Git versions, and the description file is only used by the GitWeb program, so don’t worry about those. The config file contains your project-specific configuration options, and the info directory keeps a global exclude file for ignored patterns that you don’t want to track in a .gitignore file. The hooks directory contains your client- or server-side hook scripts, which are discussed in detail in Chapter 7.
This leaves four important entries: the HEAD and index files and the objects and refs directories. These are the core parts of Git. The objects directory stores all the content for your database, the refs directory stores pointers into commit objects in that data (branches), the HEAD file points to the branch you currently have checked out, and the index file is where Git stores your staging area information. You’ll now look at each of these sections in detail to see how Git operates.