From 8e76a3546f5ff1e72e03499bf10d4a05596b8b01 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 Jan 2024 16:11:49 -0800 Subject: Autogenerated HTML docs for v2.43.0-473-gc5b454 --- MyFirstContribution.html | 9 +++++---- MyFirstContribution.txt | 5 +++-- MyFirstObjectWalk.html | 2 +- RelNotes/2.44.0.txt | 16 ++++++++++++++++ ReviewingGuidelines.html | 2 +- SubmittingPatches.html | 2 +- ToolsForGit.html | 2 +- everyday.html | 2 +- git-rebase.html | 9 ++++----- git-rebase.txt | 7 +++---- git-remote-helpers.html | 2 +- gitglossary.html | 26 ++++++++++++++++++++++++++ glossary-content.txt | 14 ++++++++++++++ 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 | 15 ++++++++++++++- 50 files changed, 142 insertions(+), 73 deletions(-) diff --git a/MyFirstContribution.html b/MyFirstContribution.html index f8273eb19..2b5912ff8 100644 --- a/MyFirstContribution.html +++ b/MyFirstContribution.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -775,8 +775,9 @@ announcements, design discussions, and more take place. Those interested in contributing are welcome to post questions here. The Git list requires plain-text-only emails and prefers inline and bottom-posting when replying to mail; you will be CC’d in all replies to you. Optionally, you can subscribe to -the list by sending an email to majordomo@vger.kernel.org with "subscribe git" -in the body. The archive of this mailing list is +the list by sending an email to <git+subscribe@vger.kernel.org> +(see https://subspace.kernel.org/subscribing.html for details). +The archive of this mailing list is available to view in a browser.

@@ -2097,7 +2098,7 @@ should generate your diffs from <topic>..<mybranch> and diff --git a/MyFirstContribution.txt b/MyFirstContribution.txt index 279f6a3e7..f06563e98 100644 --- a/MyFirstContribution.txt +++ b/MyFirstContribution.txt @@ -35,8 +35,9 @@ announcements, design discussions, and more take place. Those interested in contributing are welcome to post questions here. The Git list requires plain-text-only emails and prefers inline and bottom-posting when replying to mail; you will be CC'd in all replies to you. Optionally, you can subscribe to -the list by sending an email to majordomo@vger.kernel.org with "subscribe git" -in the body. The https://lore.kernel.org/git[archive] of this mailing list is +the list by sending an email to +(see https://subspace.kernel.org/subscribing.html for details). +The https://lore.kernel.org/git[archive] of this mailing list is available to view in a browser. ==== https://groups.google.com/forum/#!forum/git-mentoring[git-mentoring@googlegroups.com] diff --git a/MyFirstObjectWalk.html b/MyFirstObjectWalk.html index 9ddc4e638..8297f59fc 100644 --- a/MyFirstObjectWalk.html +++ b/MyFirstObjectWalk.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/RelNotes/2.44.0.txt b/RelNotes/2.44.0.txt index 9db3ea824..8dcc97cfa 100644 --- a/RelNotes/2.44.0.txt +++ b/RelNotes/2.44.0.txt @@ -59,6 +59,10 @@ UI, Workflows & Features maintenance" wrote into a wrong "global config" file, which have been corrected. + * Define "special ref" as a very narrow set that consists of + FETCH_HEAD and MERGE_HEAD, and clarify everything else that used to + be classified as such are actually just pseudorefs. + Performance, Internal Implementation, Development Support etc. @@ -211,6 +215,16 @@ Fixes since v2.43 data from commit-graph too early, which has been corrected. (merge d70f554cdf jk/commit-graph-slab-clear-fix later to maint). + * Update to a new feature recently added, "git show-ref --exists". + (merge 0aabeaa562 tc/show-ref-exists-fix later to maint). + + * oss-fuzz tests are built and run in CI. + (merge c4a9cf1df3 js/oss-fuzz-build-in-ci later to maint). + + * Rename detection logic ignored the final line of a file if it is an + incomplete line. + (merge 1c5bc6971e en/diffcore-delta-final-line-fix later to maint). + * Other code cleanup, docfix, build fix, etc. (merge 50f1abcff6 js/packfile-h-typofix later to maint). (merge cbf498eb53 jb/reflog-expire-delete-dry-run-options later to maint). @@ -247,3 +261,5 @@ Fixes since v2.43 (merge 8f50984cf4 ne/doc-filter-blob-limit-fix later to maint). (merge f10b0989b8 la/strvec-comment-fix later to maint). (merge 8430b438f6 vd/fsck-submodule-url-test later to maint). + (merge f10031fadd nb/rebase-x-shell-docfix later to maint). + (merge af3d2c160f jc/majordomo-to-subspace later to maint). diff --git a/ReviewingGuidelines.html b/ReviewingGuidelines.html index fb1639c40..77e348a09 100644 --- a/ReviewingGuidelines.html +++ b/ReviewingGuidelines.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/SubmittingPatches.html b/SubmittingPatches.html index aed56494f..e43b1a5ce 100644 --- a/SubmittingPatches.html +++ b/SubmittingPatches.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/ToolsForGit.html b/ToolsForGit.html index d8cff5827..e83ea334f 100644 --- a/ToolsForGit.html +++ b/ToolsForGit.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/everyday.html b/everyday.html index 3522b4529..a4dac775b 100644 --- a/everyday.html +++ b/everyday.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/git-rebase.html b/git-rebase.html index 067e046f5..63fbe15bc 100644 --- a/git-rebase.html +++ b/git-rebase.html @@ -2290,10 +2290,9 @@ exec cd subdir; make test

The interactive rebase will stop when a command fails (i.e. exits with non-0 status) to give you an opportunity to fix the problem. You can continue with git rebase --continue.

-

The "exec" command launches the command in a shell (the one specified -in $SHELL, or the default shell if $SHELL is not set), so you can -use shell features (like "cd", ">", ";" …). The command is run from -the root of the working tree.

+

The "exec" command launches the command in a shell (the default one, usually +/bin/sh), so you can use shell features (like "cd", ">", ";" …). The command +is run from the root of the working tree.

$ git rebase -i --exec "make test"
@@ -2811,7 +2810,7 @@ sequence.editor diff --git a/git-rebase.txt b/git-rebase.txt index 8a8d32161..06206521f 100644 --- a/git-rebase.txt +++ b/git-rebase.txt @@ -966,10 +966,9 @@ The interactive rebase will stop when a command fails (i.e. exits with non-0 status) to give you an opportunity to fix the problem. You can continue with `git rebase --continue`. -The "exec" command launches the command in a shell (the one specified -in `$SHELL`, or the default shell if `$SHELL` is not set), so you can -use shell features (like "cd", ">", ";" ...). The command is run from -the root of the working tree. +The "exec" command launches the command in a shell (the default one, usually +/bin/sh), so you can use shell features (like "cd", ">", ";" ...). The command +is run from the root of the working tree. ---------------------------------- $ git rebase -i --exec "make test" diff --git a/git-remote-helpers.html b/git-remote-helpers.html index ced7978ff..64d90d1f9 100644 --- a/git-remote-helpers.html +++ b/git-remote-helpers.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/gitglossary.html b/gitglossary.html index 38c2bba9e..9bd523c7a 100644 --- a/gitglossary.html +++ b/gitglossary.html @@ -1829,6 +1829,32 @@ The most notable example is HEAD.

+special ref +
+
+

+ A ref that has different semantics than normal refs. These refs can be + accessed via normal Git commands but may not behave the same as a + normal ref in some cases. +

+

The following special refs are known to Git:

+
    +
  • +

    +"FETCH_HEAD" is written by git-fetch(1) or git-pull(1). It + may refer to multiple object IDs. Each object ID is annotated with metadata + indicating where it was fetched from and its fetch status. +

    +
  • +
  • +

    +"MERGE_HEAD" is written by git-merge(1) when resolving merge + conflicts. It contains all commit IDs which are being merged. +

    +
  • +
+
+
submodule
diff --git a/glossary-content.txt b/glossary-content.txt index f7d98c11e..d71b19995 100644 --- a/glossary-content.txt +++ b/glossary-content.txt @@ -638,6 +638,20 @@ The most notable example is `HEAD`. An <> used to temporarily store the contents of a <> working directory and the index for future reuse. +[[def_special_ref]]special ref:: + A ref that has different semantics than normal refs. These refs can be + accessed via normal Git commands but may not behave the same as a + normal ref in some cases. ++ +The following special refs are known to Git: + + - "`FETCH_HEAD`" is written by linkgit:git-fetch[1] or linkgit:git-pull[1]. It + may refer to multiple object IDs. Each object ID is annotated with metadata + indicating where it was fetched from and its fetch status. + + - "`MERGE_HEAD`" is written by linkgit:git-merge[1] when resolving merge + conflicts. It contains all commit IDs which are being merged. + [[def_submodule]]submodule:: A <> that holds the history of a separate project inside another repository (the latter of diff --git a/howto/coordinate-embargoed-releases.html b/howto/coordinate-embargoed-releases.html index 8abc4517f..5d9114a86 100644 --- a/howto/coordinate-embargoed-releases.html +++ b/howto/coordinate-embargoed-releases.html @@ -1038,7 +1038,7 @@ Thanks, diff --git a/howto/keep-canonical-history-correct.html b/howto/keep-canonical-history-correct.html index 33f2cef61..dc653e135 100644 --- a/howto/keep-canonical-history-correct.html +++ b/howto/keep-canonical-history-correct.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -939,7 +939,7 @@ tip of your master again and redo the two merges:

diff --git a/howto/maintain-git.html b/howto/maintain-git.html index aa3fdc8b6..3e536ca74 100644 --- a/howto/maintain-git.html +++ b/howto/maintain-git.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -1479,7 +1479,7 @@ $ git update-ref -d $mf/ai/topic diff --git a/howto/new-command.html b/howto/new-command.html index 8394cc17c..0e5cc5b42 100644 --- a/howto/new-command.html +++ b/howto/new-command.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -864,7 +864,7 @@ letter [PATCH 0/n]. diff --git a/howto/rebase-from-internal-branch.html b/howto/rebase-from-internal-branch.html index 88efaef66..d72293da4 100644 --- a/howto/rebase-from-internal-branch.html +++ b/howto/rebase-from-internal-branch.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -896,7 +896,7 @@ the #1' commit.

diff --git a/howto/rebuild-from-update-hook.html b/howto/rebuild-from-update-hook.html index b224648c0..d3d897a8d 100644 --- a/howto/rebuild-from-update-hook.html +++ b/howto/rebuild-from-update-hook.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -848,7 +848,7 @@ This is still crude and does not protect against simultaneous diff --git a/howto/recover-corrupted-blob-object.html b/howto/recover-corrupted-blob-object.html index 1e2e7c57d..5c03563a4 100644 --- a/howto/recover-corrupted-blob-object.html +++ b/howto/recover-corrupted-blob-object.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -881,7 +881,7 @@ thing.

diff --git a/howto/recover-corrupted-object-harder.html b/howto/recover-corrupted-object-harder.html index 45f7cc383..8b200d790 100644 --- a/howto/recover-corrupted-object-harder.html +++ b/howto/recover-corrupted-object-harder.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -1190,7 +1190,7 @@ int main(int argc, char **argv) diff --git a/howto/revert-a-faulty-merge.html b/howto/revert-a-faulty-merge.html index ba3ab9e1b..e26b4da93 100644 --- a/howto/revert-a-faulty-merge.html +++ b/howto/revert-a-faulty-merge.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -1026,7 +1026,7 @@ P---o---o---M---x---x---W---x---M2 diff --git a/howto/revert-branch-rebase.html b/howto/revert-branch-rebase.html index 9fce20785..30906d933 100644 --- a/howto/revert-branch-rebase.html +++ b/howto/revert-branch-rebase.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -908,7 +908,7 @@ Committed merge 7fb9b7262a1d1e0a47bbfdcbbcf50ce0635d3f8f diff --git a/howto/separating-topic-branches.html b/howto/separating-topic-branches.html index 67fea336b..ffa1c294a 100644 --- a/howto/separating-topic-branches.html +++ b/howto/separating-topic-branches.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -842,7 +842,7 @@ o---o"master" diff --git a/howto/setup-git-server-over-http.html b/howto/setup-git-server-over-http.html index 37765158b..28d47b48d 100644 --- a/howto/setup-git-server-over-http.html +++ b/howto/setup-git-server-over-http.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -1072,7 +1072,7 @@ help diagnosing the problem, but removes security checks.

diff --git a/howto/update-hook-example.html b/howto/update-hook-example.html index 0fe5c49ff..d462d452b 100644 --- a/howto/update-hook-example.html +++ b/howto/update-hook-example.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -931,7 +931,7 @@ that JC can make non-fast-forward pushes on it.

diff --git a/howto/use-git-daemon.html b/howto/use-git-daemon.html index 64cc73b15..98f35eace 100644 --- a/howto/use-git-daemon.html +++ b/howto/use-git-daemon.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -792,7 +792,7 @@ a good practice to put the paths after a "--" separator.

diff --git a/howto/using-merge-subtree.html b/howto/using-merge-subtree.html index bcbde2dcf..7cf42f754 100644 --- a/howto/using-merge-subtree.html +++ b/howto/using-merge-subtree.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -849,7 +849,7 @@ Please note that if the other project merges from you, then it will diff --git a/howto/using-signed-tag-in-pull-request.html b/howto/using-signed-tag-in-pull-request.html index 572dd0730..245bad894 100644 --- a/howto/using-signed-tag-in-pull-request.html +++ b/howto/using-signed-tag-in-pull-request.html @@ -735,7 +735,7 @@ asciidoc.install();
@@ -953,7 +953,7 @@ as part of the merge commit.

diff --git a/technical/api-error-handling.html b/technical/api-error-handling.html index 702e0809e..5ed6d6e44 100644 --- a/technical/api-error-handling.html +++ b/technical/api-error-handling.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/api-index.html b/technical/api-index.html index b45bae344..2f3cc2244 100644 --- a/technical/api-index.html +++ b/technical/api-index.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/api-merge.html b/technical/api-merge.html index b5d3e7f09..fdec18b15 100644 --- a/technical/api-merge.html +++ b/technical/api-merge.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/api-parse-options.html b/technical/api-parse-options.html index d468d21a9..1468cc825 100644 --- a/technical/api-parse-options.html +++ b/technical/api-parse-options.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/api-simple-ipc.html b/technical/api-simple-ipc.html index 0e22679a6..1b13ffd1b 100644 --- a/technical/api-simple-ipc.html +++ b/technical/api-simple-ipc.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/api-trace2.html b/technical/api-trace2.html index da8226665..c59e7120d 100644 --- a/technical/api-trace2.html +++ b/technical/api-trace2.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/bitmap-format.html b/technical/bitmap-format.html index 8dd213645..7b7d6904d 100644 --- a/technical/bitmap-format.html +++ b/technical/bitmap-format.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/bundle-uri.html b/technical/bundle-uri.html index e787cf54f..ee3bda464 100644 --- a/technical/bundle-uri.html +++ b/technical/bundle-uri.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/hash-function-transition.html b/technical/hash-function-transition.html index 6cef2b43c..7cef3e404 100644 --- a/technical/hash-function-transition.html +++ b/technical/hash-function-transition.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/long-running-process-protocol.html b/technical/long-running-process-protocol.html index 7691476da..1f471849e 100644 --- a/technical/long-running-process-protocol.html +++ b/technical/long-running-process-protocol.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/multi-pack-index.html b/technical/multi-pack-index.html index f281ae228..3262283cc 100644 --- a/technical/multi-pack-index.html +++ b/technical/multi-pack-index.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/pack-heuristics.html b/technical/pack-heuristics.html index a03860a26..3381182c8 100644 --- a/technical/pack-heuristics.html +++ b/technical/pack-heuristics.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/parallel-checkout.html b/technical/parallel-checkout.html index 28f3e2678..e5387d370 100644 --- a/technical/parallel-checkout.html +++ b/technical/parallel-checkout.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/partial-clone.html b/technical/partial-clone.html index 6a0492b1e..d97a7c9c6 100644 --- a/technical/partial-clone.html +++ b/technical/partial-clone.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/racy-git.html b/technical/racy-git.html index 47c594b29..01ad4c60f 100644 --- a/technical/racy-git.html +++ b/technical/racy-git.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/scalar.html b/technical/scalar.html index 677dbf7bf..dea07b1ac 100644 --- a/technical/scalar.html +++ b/technical/scalar.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/send-pack-pipeline.html b/technical/send-pack-pipeline.html index 2d7fc7c07..5fddec092 100644 --- a/technical/send-pack-pipeline.html +++ b/technical/send-pack-pipeline.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/shallow.html b/technical/shallow.html index b25455658..268cbffb3 100644 --- a/technical/shallow.html +++ b/technical/shallow.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/trivial-merge.html b/technical/trivial-merge.html index 457944511..43096c311 100644 --- a/technical/trivial-merge.html +++ b/technical/trivial-merge.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/technical/unit-tests.html b/technical/unit-tests.html index 9cf7f5684..9b16c7c23 100644 --- a/technical/unit-tests.html +++ b/technical/unit-tests.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/user-manual.html b/user-manual.html index ac9b94af6..3d51482a5 100644 --- a/user-manual.html +++ b/user-manual.html @@ -1,5 +1,5 @@ -Git User Manual

Git User Manual

Revision History
2024-01-26

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-01-29

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 @@ -2645,6 +2645,19 @@ The most notable example is HEAD.

object used to temporarily store the contents of a dirty working directory and the index for future reuse.
+special ref +

+ A ref that has different semantics than normal refs. These refs can be + accessed via normal Git commands but may not behave the same as a + normal ref in some cases. +

The following special refs are known to Git:

  • +"FETCH_HEAD" is written by git-fetch(1) or git-pull(1). It + may refer to multiple object IDs. Each object ID is annotated with metadata + indicating where it was fetched from and its fetch status. +
  • +"MERGE_HEAD" is written by git-merge(1) when resolving merge + conflicts. It contains all commit IDs which are being merged. +
submodule
A repository that holds the history of a -- cgit 1.2.3-korg