From e99011429084c5e70c58031325f78a5d4b077a12 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Apr 2024 14:11:43 -0700 Subject: [PATCH] Autogenerated HTML docs for v2.44.0-448-gc2cbf --- MyFirstContribution.html | 2 +- MyFirstObjectWalk.html | 2 +- RelNotes/2.45.0.txt | 26 +++++++++++++++ ReviewingGuidelines.html | 2 +- SubmittingPatches.html | 2 +- ToolsForGit.html | 2 +- config.txt | 28 ++++++++-------- everyday.html | 2 +- git-config.html | 34 +++++++++++++------- git-remote-helpers.html | 2 +- gitremote-helpers.html | 8 ++--- gitremote-helpers.txt | 6 ++-- howto/coordinate-embargoed-releases.html | 2 +- howto/keep-canonical-history-correct.html | 4 +-- howto/maintain-git.html | 4 +-- howto/new-command.html | 4 +-- howto/rebase-from-internal-branch.html | 4 +-- howto/rebuild-from-update-hook.html | 4 +-- howto/recover-corrupted-blob-object.html | 4 +-- howto/recover-corrupted-object-harder.html | 4 +-- howto/revert-a-faulty-merge.html | 4 +-- howto/revert-branch-rebase.html | 4 +-- howto/separating-topic-branches.html | 4 +-- howto/setup-git-server-over-http.html | 4 +-- howto/update-hook-example.html | 4 +-- howto/use-git-daemon.html | 4 +-- howto/using-merge-subtree.html | 4 +-- howto/using-signed-tag-in-pull-request.html | 4 +-- technical/api-error-handling.html | 2 +- technical/api-index.html | 2 +- technical/api-merge.html | 2 +- technical/api-parse-options.html | 2 +- technical/api-simple-ipc.html | 2 +- technical/api-trace2.html | 2 +- technical/bitmap-format.html | 2 +- technical/bundle-uri.html | 2 +- technical/hash-function-transition.html | 2 +- technical/long-running-process-protocol.html | 2 +- technical/multi-pack-index.html | 2 +- technical/pack-heuristics.html | 2 +- technical/parallel-checkout.html | 2 +- technical/partial-clone.html | 2 +- technical/racy-git.html | 2 +- technical/scalar.html | 2 +- technical/send-pack-pipeline.html | 2 +- technical/shallow.html | 2 +- technical/trivial-merge.html | 2 +- technical/unit-tests.html | 2 +- user-manual.html | 2 +- 49 files changed, 129 insertions(+), 91 deletions(-) diff --git a/MyFirstContribution.html b/MyFirstContribution.html index dae31e748..156628405 100644 --- a/MyFirstContribution.html +++ b/MyFirstContribution.html @@ -735,7 +735,7 @@
diff --git a/MyFirstObjectWalk.html b/MyFirstObjectWalk.html index 889fdfd24..58996e16b 100644 --- a/MyFirstObjectWalk.html +++ b/MyFirstObjectWalk.html @@ -735,7 +735,7 @@
diff --git a/RelNotes/2.45.0.txt b/RelNotes/2.45.0.txt index cabdaf48b..c73354f6c 100644 --- a/RelNotes/2.45.0.txt +++ b/RelNotes/2.45.0.txt @@ -57,6 +57,9 @@ UI, Workflows & Features * Remove an ancient and not well maintained Hg-to-git migration script from contrib/. + * Hints that suggest what to do after resolving conflicts can now be + squelched by disabling advice.mergeConflict. + Performance, Internal Implementation, Development Support etc. @@ -111,6 +114,10 @@ Performance, Internal Implementation, Development Support etc. * A new fuzz target that exercises config parsing code has been added. + * Fix the way recently added tests interpolate variables defined + outside them, and document the best practice to help future + developers. + Fixes since v2.44 ----------------- @@ -244,6 +251,25 @@ Fixes since v2.44 updated. (merge bff85a338c bl/doc-key-val-sep-fix later to maint). + * "git checkout --conflict=bad" reported a bad conflictStyle as if it + were given to a configuration variable; it has been corrected to + report that the command line option is bad. + (merge 5a99c1ac1a pw/checkout-conflict-errorfix later to maint). + + * Code clean-up in the "git log" machinery that implements custom log + message formatting. + (merge 1c10b8e5b0 jk/pretty-subject-cleanup later to maint). + + * "git config" corrupted literal HT characters written in the + configuration file as part of a value, which has been corrected. + (merge e6895c3f97 ds/config-internal-whitespace-fix later to maint). + + * A unit test for reftable code tried to enumerate all files in a + directory after reftable operations and expected to see nothing but + the files it wanted to leave there, but was fooled by .nfs* cruft + files left, which has been corrected. + (merge 0068aa7946 ps/reftable-unit-test-nfs-workaround later to maint). + * Other code cleanup, docfix, build fix, etc. (merge f0e578c69c rs/use-xstrncmpz later to maint). (merge 83e6eb7d7a ba/credential-test-clean-fix later to maint). diff --git a/ReviewingGuidelines.html b/ReviewingGuidelines.html index 263681834..f0568c3fb 100644 --- a/ReviewingGuidelines.html +++ b/ReviewingGuidelines.html @@ -735,7 +735,7 @@
diff --git a/SubmittingPatches.html b/SubmittingPatches.html index a3bf5da63..4d43c6dea 100644 --- a/SubmittingPatches.html +++ b/SubmittingPatches.html @@ -735,7 +735,7 @@
diff --git a/ToolsForGit.html b/ToolsForGit.html index 7a82ae560..150fef2d1 100644 --- a/ToolsForGit.html +++ b/ToolsForGit.html @@ -735,7 +735,7 @@
diff --git a/config.txt b/config.txt index 782c2bab9..70b448b13 100644 --- a/config.txt +++ b/config.txt @@ -22,9 +22,10 @@ multivalued. Syntax ~~~~~~ -The syntax is fairly flexible and permissive; whitespaces are mostly -ignored. The '#' and ';' characters begin comments to the end of line, -blank lines are ignored. +The syntax is fairly flexible and permissive. Whitespace characters, +which in this context are the space character (SP) and the horizontal +tabulation (HT), are mostly ignored. The '#' and ';' characters begin +comments to the end of line. Blank lines are ignored. The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next @@ -63,16 +64,17 @@ the variable is the boolean "true"). The variable names are case-insensitive, allow only alphanumeric characters and `-`, and must start with an alphabetic character. -A line that defines a value can be continued to the next line by -ending it with a `\`; the backslash and the end-of-line are -stripped. Leading whitespaces after 'name =', the remainder of the -line after the first comment character '#' or ';', and trailing -whitespaces of the line are discarded unless they are enclosed in -double quotes. Internal whitespaces within the value are retained -verbatim. - -Inside double quotes, double quote `"` and backslash `\` characters -must be escaped: use `\"` for `"` and `\\` for `\`. +Whitespace characters surrounding `name`, `=` and `value` are discarded. +Internal whitespace characters within 'value' are retained verbatim. +Comments starting with either `#` or `;` and extending to the end of line +are discarded. A line that defines a value can be continued to the next +line by ending it with a backslash (`\`); the backslash and the end-of-line +characters are discarded. + +If `value` needs to contain leading or trailing whitespace characters, +it must be enclosed in double quotation marks (`"`). Inside double quotation +marks, double quote (`"`) and backslash (`\`) characters must be escaped: +use `\"` for `"` and `\\` for `\`. The following escape sequences (beside `\"` and `\\`) are recognized: `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) diff --git a/everyday.html b/everyday.html index e889bef08..7ae962429 100644 --- a/everyday.html +++ b/everyday.html @@ -735,7 +735,7 @@
diff --git a/git-config.html b/git-config.html index 3c638629a..8431ba803 100644 --- a/git-config.html +++ b/git-config.html @@ -1588,9 +1588,10 @@

CONFIGURATION FILE

multivalued.

Syntax

-

The syntax is fairly flexible and permissive; whitespaces are mostly -ignored. The # and ; characters begin comments to the end of line, -blank lines are ignored.

+

The syntax is fairly flexible and permissive. Whitespace characters, +which in this context are the space character (SP) and the horizontal +tabulation (HT), are mostly ignored. The # and ; characters begin +comments to the end of line. Blank lines are ignored.

The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next section begins. Section names are case-insensitive. Only alphanumeric @@ -1622,15 +1623,16 @@

Syntax

the variable is the boolean "true"). The variable names are case-insensitive, allow only alphanumeric characters and -, and must start with an alphabetic character.

-

A line that defines a value can be continued to the next line by -ending it with a \; the backslash and the end-of-line are -stripped. Leading whitespaces after name =, the remainder of the -line after the first comment character # or ;, and trailing -whitespaces of the line are discarded unless they are enclosed in -double quotes. Internal whitespaces within the value are retained -verbatim.

-

Inside double quotes, double quote " and backslash \ characters -must be escaped: use \" for " and \\ for \.

+

Whitespace characters surrounding name, = and value are discarded. +Internal whitespace characters within value are retained verbatim. +Comments starting with either # or ; and extending to the end of line +are discarded. A line that defines a value can be continued to the next +line by ending it with a backslash (\); the backslash and the end-of-line +characters are discarded.

+

If value needs to contain leading or trailing whitespace characters, +it must be enclosed in double quotation marks ("). Inside double quotation +marks, double quote (") and backslash (\) characters must be escaped: +use \" for " and \\ for \.

The following escape sequences (beside \" and \\) are recognized: \n for newline character (NL), \t for horizontal tabulation (HT, TAB) and \b for backspace (BS). Other char escape sequences (including octal @@ -2148,6 +2150,14 @@

Variables

+mergeConflict +
+
+

+ Shown when various commands stop because of conflicts. +

+
+
nestedTag
diff --git a/git-remote-helpers.html b/git-remote-helpers.html index 877728df1..90f5fb0c4 100644 --- a/git-remote-helpers.html +++ b/git-remote-helpers.html @@ -735,7 +735,7 @@
diff --git a/gitremote-helpers.html b/gitremote-helpers.html index 36f36fb41..83b6fa659 100644 --- a/gitremote-helpers.html +++ b/gitremote-helpers.html @@ -1369,7 +1369,7 @@

OPTIONS

-'option deepen-since <timestamp> +option deepen-since <timestamp>

@@ -1377,7 +1377,7 @@

OPTIONS

-'option deepen-not <ref> +option deepen-not <ref>

@@ -1386,7 +1386,7 @@

OPTIONS

-option deepen-relative {'true|false} +option deepen-relative {true|false}

@@ -1537,7 +1537,7 @@

GIT

diff --git a/gitremote-helpers.txt b/gitremote-helpers.txt index 07c8439a6..fcb633e71 100644 --- a/gitremote-helpers.txt +++ b/gitremote-helpers.txt @@ -479,14 +479,14 @@ set by Git if the remote helper has the 'option' capability. 'option depth' :: Deepens the history of a shallow repository. -'option deepen-since :: +'option deepen-since' :: Deepens the history of a shallow repository based on time. -'option deepen-not :: +'option deepen-not' :: Deepens the history of a shallow repository excluding ref. Multiple options add up. -'option deepen-relative {'true'|'false'}:: +'option deepen-relative' {'true'|'false'}:: Deepens the history of a shallow repository relative to current boundary. Only valid when used with "option depth". diff --git a/howto/coordinate-embargoed-releases.html b/howto/coordinate-embargoed-releases.html index 88ffc5284..ab79aeae1 100644 --- a/howto/coordinate-embargoed-releases.html +++ b/howto/coordinate-embargoed-releases.html @@ -1038,7 +1038,7 @@

diff --git a/howto/keep-canonical-history-correct.html b/howto/keep-canonical-history-correct.html index 2e7dcd4a3..4829ed4f1 100644 --- a/howto/keep-canonical-history-correct.html +++ b/howto/keep-canonical-history-correct.html @@ -735,7 +735,7 @@
@@ -939,7 +939,7 @@

Keep authoritative canonical history correct with git pull

diff --git a/howto/maintain-git.html b/howto/maintain-git.html index 5fefcaeb1..2fe61ff6d 100644 --- a/howto/maintain-git.html +++ b/howto/maintain-git.html @@ -735,7 +735,7 @@
@@ -1479,7 +1479,7 @@

Preparing a "merge-fix"

diff --git a/howto/new-command.html b/howto/new-command.html index aee5b1c95..8c9c55c26 100644 --- a/howto/new-command.html +++ b/howto/new-command.html @@ -735,7 +735,7 @@
@@ -864,7 +864,7 @@

Integrating a command

diff --git a/howto/rebase-from-internal-branch.html b/howto/rebase-from-internal-branch.html index de8b32b4e..4cef4887b 100644 --- a/howto/rebase-from-internal-branch.html +++ b/howto/rebase-from-internal-branch.html @@ -735,7 +735,7 @@
@@ -896,7 +896,7 @@

How to rebase from an internal branch

diff --git a/howto/rebuild-from-update-hook.html b/howto/rebuild-from-update-hook.html index 4ddbf1adb..a896422c4 100644 --- a/howto/rebuild-from-update-hook.html +++ b/howto/rebuild-from-update-hook.html @@ -735,7 +735,7 @@
@@ -848,7 +848,7 @@

How to rebuild from update hook

diff --git a/howto/recover-corrupted-blob-object.html b/howto/recover-corrupted-blob-object.html index d80d64773..7b7fa3125 100644 --- a/howto/recover-corrupted-blob-object.html +++ b/howto/recover-corrupted-blob-object.html @@ -735,7 +735,7 @@
@@ -881,7 +881,7 @@

How to recover a corrupted blob object

diff --git a/howto/recover-corrupted-object-harder.html b/howto/recover-corrupted-object-harder.html index fcf261acf..5f2741527 100644 --- a/howto/recover-corrupted-object-harder.html +++ b/howto/recover-corrupted-object-harder.html @@ -735,7 +735,7 @@
@@ -1190,7 +1190,7 @@

The adventure continues…

diff --git a/howto/revert-a-faulty-merge.html b/howto/revert-a-faulty-merge.html index 5be923201..2e278fd55 100644 --- a/howto/revert-a-faulty-merge.html +++ b/howto/revert-a-faulty-merge.html @@ -735,7 +735,7 @@
@@ -1026,7 +1026,7 @@

How to revert a faulty merge

diff --git a/howto/revert-branch-rebase.html b/howto/revert-branch-rebase.html index 0d13271ac..b807cf8b4 100644 --- a/howto/revert-branch-rebase.html +++ b/howto/revert-branch-rebase.html @@ -735,7 +735,7 @@
@@ -908,7 +908,7 @@

How to revert an existing commit

diff --git a/howto/separating-topic-branches.html b/howto/separating-topic-branches.html index 54d5549de..d70e325b2 100644 --- a/howto/separating-topic-branches.html +++ b/howto/separating-topic-branches.html @@ -735,7 +735,7 @@
@@ -842,7 +842,7 @@

How to separate topic branches

diff --git a/howto/setup-git-server-over-http.html b/howto/setup-git-server-over-http.html index 90574658c..16f707381 100644 --- a/howto/setup-git-server-over-http.html +++ b/howto/setup-git-server-over-http.html @@ -735,7 +735,7 @@
@@ -1072,7 +1072,7 @@

Troubleshooting:

diff --git a/howto/update-hook-example.html b/howto/update-hook-example.html index 7cf7bca89..784137230 100644 --- a/howto/update-hook-example.html +++ b/howto/update-hook-example.html @@ -735,7 +735,7 @@
@@ -931,7 +931,7 @@

How to use the update hook

diff --git a/howto/use-git-daemon.html b/howto/use-git-daemon.html index c1f693278..fad7ddba2 100644 --- a/howto/use-git-daemon.html +++ b/howto/use-git-daemon.html @@ -735,7 +735,7 @@
@@ -792,7 +792,7 @@

How to use git-daemon

diff --git a/howto/using-merge-subtree.html b/howto/using-merge-subtree.html index 413ffd327..99717badf 100644 --- a/howto/using-merge-subtree.html +++ b/howto/using-merge-subtree.html @@ -735,7 +735,7 @@
@@ -849,7 +849,7 @@

Additional tips

diff --git a/howto/using-signed-tag-in-pull-request.html b/howto/using-signed-tag-in-pull-request.html index 0aa688db0..8da45dba8 100644 --- a/howto/using-signed-tag-in-pull-request.html +++ b/howto/using-signed-tag-in-pull-request.html @@ -735,7 +735,7 @@
@@ -953,7 +953,7 @@

Auditors

diff --git a/technical/api-error-handling.html b/technical/api-error-handling.html index 4d6ece189..a7b1bd63b 100644 --- a/technical/api-error-handling.html +++ b/technical/api-error-handling.html @@ -735,7 +735,7 @@
diff --git a/technical/api-index.html b/technical/api-index.html index 4e4b5091d..985ab6977 100644 --- a/technical/api-index.html +++ b/technical/api-index.html @@ -735,7 +735,7 @@
diff --git a/technical/api-merge.html b/technical/api-merge.html index 574078857..d4f1ad13e 100644 --- a/technical/api-merge.html +++ b/technical/api-merge.html @@ -735,7 +735,7 @@
diff --git a/technical/api-parse-options.html b/technical/api-parse-options.html index b859d6ff0..9f7509c15 100644 --- a/technical/api-parse-options.html +++ b/technical/api-parse-options.html @@ -735,7 +735,7 @@
diff --git a/technical/api-simple-ipc.html b/technical/api-simple-ipc.html index d9231616d..e62a6fea5 100644 --- a/technical/api-simple-ipc.html +++ b/technical/api-simple-ipc.html @@ -735,7 +735,7 @@
diff --git a/technical/api-trace2.html b/technical/api-trace2.html index 403972942..5f0a76986 100644 --- a/technical/api-trace2.html +++ b/technical/api-trace2.html @@ -735,7 +735,7 @@
diff --git a/technical/bitmap-format.html b/technical/bitmap-format.html index f1c232ef8..fc33d587d 100644 --- a/technical/bitmap-format.html +++ b/technical/bitmap-format.html @@ -735,7 +735,7 @@
diff --git a/technical/bundle-uri.html b/technical/bundle-uri.html index e2cabcea2..3d5241fe5 100644 --- a/technical/bundle-uri.html +++ b/technical/bundle-uri.html @@ -735,7 +735,7 @@
diff --git a/technical/hash-function-transition.html b/technical/hash-function-transition.html index bc80c0652..87986876b 100644 --- a/technical/hash-function-transition.html +++ b/technical/hash-function-transition.html @@ -735,7 +735,7 @@
diff --git a/technical/long-running-process-protocol.html b/technical/long-running-process-protocol.html index 27b7b4800..aac1b0d9d 100644 --- a/technical/long-running-process-protocol.html +++ b/technical/long-running-process-protocol.html @@ -735,7 +735,7 @@
diff --git a/technical/multi-pack-index.html b/technical/multi-pack-index.html index dbc2bab62..223dfd50e 100644 --- a/technical/multi-pack-index.html +++ b/technical/multi-pack-index.html @@ -735,7 +735,7 @@
diff --git a/technical/pack-heuristics.html b/technical/pack-heuristics.html index 813916f88..c75cfa460 100644 --- a/technical/pack-heuristics.html +++ b/technical/pack-heuristics.html @@ -735,7 +735,7 @@
diff --git a/technical/parallel-checkout.html b/technical/parallel-checkout.html index 04c7a0b8d..d63c145ba 100644 --- a/technical/parallel-checkout.html +++ b/technical/parallel-checkout.html @@ -735,7 +735,7 @@
diff --git a/technical/partial-clone.html b/technical/partial-clone.html index e0950d7de..d0509a9cc 100644 --- a/technical/partial-clone.html +++ b/technical/partial-clone.html @@ -735,7 +735,7 @@
diff --git a/technical/racy-git.html b/technical/racy-git.html index 2aab0de92..96f234d81 100644 --- a/technical/racy-git.html +++ b/technical/racy-git.html @@ -735,7 +735,7 @@
diff --git a/technical/scalar.html b/technical/scalar.html index 27e339101..adbaa8a02 100644 --- a/technical/scalar.html +++ b/technical/scalar.html @@ -735,7 +735,7 @@
diff --git a/technical/send-pack-pipeline.html b/technical/send-pack-pipeline.html index 0f3e52f82..731008b17 100644 --- a/technical/send-pack-pipeline.html +++ b/technical/send-pack-pipeline.html @@ -735,7 +735,7 @@
diff --git a/technical/shallow.html b/technical/shallow.html index 4a146f7b0..0e0fbf881 100644 --- a/technical/shallow.html +++ b/technical/shallow.html @@ -735,7 +735,7 @@
diff --git a/technical/trivial-merge.html b/technical/trivial-merge.html index d90a7a5e8..c10a036d2 100644 --- a/technical/trivial-merge.html +++ b/technical/trivial-merge.html @@ -735,7 +735,7 @@
diff --git a/technical/unit-tests.html b/technical/unit-tests.html index 82919d296..6c8edb840 100644 --- a/technical/unit-tests.html +++ b/technical/unit-tests.html @@ -735,7 +735,7 @@
diff --git a/user-manual.html b/user-manual.html index 4e3389347..66492fea2 100644 --- a/user-manual.html +++ b/user-manual.html @@ -1,5 +1,5 @@ -Git User Manual

Git User Manual

Revision History
2024-03-28

Table of Contents

Introduction
1. Repositories and Branches
How to get a Git repository
How to check out a different version of a project
Understanding History: Commits
Understanding history: commits, parents, and reachability
Understanding history: History diagrams
Understanding history: What is a branch?
Manipulating branches
Examining an old version without creating a new branch
Examining branches from a remote repository
Naming branches, tags, and other references
Updating a repository with git fetch
Fetching branches from other repositories
2. Exploring Git history
How to use bisect to find a regression
Naming commits
Creating tags
Browsing revisions
Generating diffs
Viewing old file versions
Examples
Counting the number of commits on a branch
Check whether two branches point at the same history
Find first tagged version including a given fix
Showing commits unique to a given branch
Creating a changelog and tarball for a software release
Finding commits referencing a file with given content
3. Developing with Git
Telling Git your name
Creating a new repository
How to make a commit
Creating good commit messages
Ignoring files
How to merge
Resolving a merge
Getting conflict-resolution help during a merge
Undoing a merge
Fast-forward merges
Fixing mistakes
Fixing a mistake with a new commit
Fixing a mistake by rewriting history
Checking out an old version of a file
Temporarily setting aside work in progress
Ensuring good performance
Ensuring reliability
Checking the repository for corruption
Recovering lost changes
4. Sharing development with others
Getting updates with git pull
Submitting patches to a project
Importing patches to a project
Public Git repositories
Setting up a public repository
Exporting a Git repository via the Git protocol
Exporting a git repository via HTTP
Pushing changes to a public repository
What to do when a push fails
Setting up a shared repository
Allowing web browsing of a repository
How to get a Git repository with minimal history
Examples
Maintaining topic branches for a Linux subsystem maintainer
5. Rewriting history and maintaining patch series
Creating the perfect patch series
Keeping a patch series up to date using git rebase
Rewriting a single commit
Reordering or selecting from a patch series
Using interactive rebases
Other tools
Problems with rewriting history
Why bisecting merge commits can be harder than bisecting linear history
6. Advanced branch management
Fetching individual branches
git fetch and fast-forwards
Forcing git fetch to do non-fast-forward updates
Configuring remote-tracking branches
7. Git concepts
The Object Database
Commit Object
Tree Object
Blob Object
Trust
Tag Object
How Git stores objects efficiently: pack files
Dangling objects
Recovering from repository corruption
The index
8. Submodules
Pitfalls with submodules
9. Low-level Git operations
Object access and manipulation
The Workflow
working directory → index
index → object database
object database → index
index → working directory
Tying it all together
Examining the data
Merging multiple trees
Merging multiple trees, continued
10. Hacking Git
Object storage format
A birds-eye view of Git’s source code
11. Git Glossary
Git explained
A. Git Quick Reference
Creating a new repository
Managing branches
Exploring history
Making changes
Merging
Sharing your changes
Repository maintenance
B. Notes and todo list for this manual
Todo list

Introduction

Git is a fast distributed revision control system.

This manual is designed to be readable by someone with basic UNIX +Git User Manual

Git User Manual

Revision History
2024-04-01

Table of Contents

Introduction
1. Repositories and Branches
How to get a Git repository
How to check out a different version of a project
Understanding History: Commits
Understanding history: commits, parents, and reachability
Understanding history: History diagrams
Understanding history: What is a branch?
Manipulating branches
Examining an old version without creating a new branch
Examining branches from a remote repository
Naming branches, tags, and other references
Updating a repository with git fetch
Fetching branches from other repositories
2. Exploring Git history
How to use bisect to find a regression
Naming commits
Creating tags
Browsing revisions
Generating diffs
Viewing old file versions
Examples
Counting the number of commits on a branch
Check whether two branches point at the same history
Find first tagged version including a given fix
Showing commits unique to a given branch
Creating a changelog and tarball for a software release
Finding commits referencing a file with given content
3. Developing with Git
Telling Git your name
Creating a new repository
How to make a commit
Creating good commit messages
Ignoring files
How to merge
Resolving a merge
Getting conflict-resolution help during a merge
Undoing a merge
Fast-forward merges
Fixing mistakes
Fixing a mistake with a new commit
Fixing a mistake by rewriting history
Checking out an old version of a file
Temporarily setting aside work in progress
Ensuring good performance
Ensuring reliability
Checking the repository for corruption
Recovering lost changes
4. Sharing development with others
Getting updates with git pull
Submitting patches to a project
Importing patches to a project
Public Git repositories
Setting up a public repository
Exporting a Git repository via the Git protocol
Exporting a git repository via HTTP
Pushing changes to a public repository
What to do when a push fails
Setting up a shared repository
Allowing web browsing of a repository
How to get a Git repository with minimal history
Examples
Maintaining topic branches for a Linux subsystem maintainer
5. Rewriting history and maintaining patch series
Creating the perfect patch series
Keeping a patch series up to date using git rebase
Rewriting a single commit
Reordering or selecting from a patch series
Using interactive rebases
Other tools
Problems with rewriting history
Why bisecting merge commits can be harder than bisecting linear history
6. Advanced branch management
Fetching individual branches
git fetch and fast-forwards
Forcing git fetch to do non-fast-forward updates
Configuring remote-tracking branches
7. Git concepts
The Object Database
Commit Object
Tree Object
Blob Object
Trust
Tag Object
How Git stores objects efficiently: pack files
Dangling objects
Recovering from repository corruption
The index
8. Submodules
Pitfalls with submodules
9. Low-level Git operations
Object access and manipulation
The Workflow
working directory → index
index → object database
object database → index
index → working directory
Tying it all together
Examining the data
Merging multiple trees
Merging multiple trees, continued
10. Hacking Git
Object storage format
A birds-eye view of Git’s source code
11. Git Glossary
Git explained
A. Git Quick Reference
Creating a new repository
Managing branches
Exploring history
Making changes
Merging
Sharing your changes
Repository maintenance
B. Notes and todo list for this manual
Todo list

Introduction

Git is a fast distributed revision control system.

This manual is designed to be readable by someone with basic UNIX command-line skills, but no previous knowledge of Git.

Chapter 1, Repositories and Branches and Chapter 2, Exploring Git history explain how to fetch and study a project using git—read these chapters to learn how to build and test a particular version of a software project, search for