From 7ab2d2049fb91c247b9a764f0f7b6bbac411e5fd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 10 May 2023 11:59:24 -0700 Subject: Autogenerated HTML docs for v2.40.1-552-g91428 --- MyFirstContribution.html | 2 +- MyFirstObjectWalk.html | 2 +- RelNotes/2.41.0.txt | 30 ++++++ ReviewingGuidelines.html | 2 +- SubmittingPatches.html | 2 +- ToolsForGit.html | 2 +- everyday.html | 2 +- git-credential.html | 12 ++- git-credential.txt | 6 ++ git-remote-helpers.html | 2 +- gitattributes.html | 65 +++++++------ gitattributes.txt | 59 ++++++------ githooks.html | 27 +++++- githooks.txt | 27 +++++- gitignore.html | 6 +- gitignore.txt | 4 +- gittutorial.html | 131 +++++++++++++-------------- gittutorial.txt | 129 +++++++++++++------------- 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 +- user-manual.html | 2 +- 54 files changed, 353 insertions(+), 259 deletions(-) diff --git a/MyFirstContribution.html b/MyFirstContribution.html index 04ee43a0f..50dcf25be 100644 --- a/MyFirstContribution.html +++ b/MyFirstContribution.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/MyFirstObjectWalk.html b/MyFirstObjectWalk.html index 5ab429b90..0ad19c2a5 100644 --- a/MyFirstObjectWalk.html +++ b/MyFirstObjectWalk.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/RelNotes/2.41.0.txt b/RelNotes/2.41.0.txt index e2aa9720f..fa2834bd7 100644 --- a/RelNotes/2.41.0.txt +++ b/RelNotes/2.41.0.txt @@ -83,6 +83,14 @@ UI, Workflows & Features taken from the file specified by the "--contents" option shows it differently from a line attributed to the working tree file. + * "git send-email" learned to give the e-mail headers to the validate + hook by passing an extra argument from the command line. + + * The credential subsystem learns to help OAuth framework. + + * The titles of manual pages used to be chomped at an unreasonably + short limit, which has been removed. + Performance, Internal Implementation, Development Support etc. @@ -137,6 +145,21 @@ Performance, Internal Implementation, Development Support etc. "-win32" in "gcc 10-win32") can be safely stripped as they share the same features and bugs with the version without the suffix. + * ctype tests have been taught to test EOF, too. + + * The implementation of credential helpers used fgets() over fixed + size buffers to read protocol messages, causing the remainder of + the folded long line to trigger unexpected behaviour, which has + been corrected. + + * The implementation of the default "negotiator", used to find common + ancestor over the network for object tranfer, used to be recursive; + it was updated to be iterative to conserve stackspace usage. + + * Our custom callout formatter is no longer used in the documentation + formatting toolchain, as the upstream default ones give better + output these days. + Fixes since v2.40 ----------------- @@ -298,6 +321,10 @@ Fixes since v2.40 * Retitle a test script with an overly narrow name. (merge 8bb19c14fb ob/t3501-retitle later to maint). + * Doc update to clarify how text and eol attributes interact to + specify the end-of-line conversion. + (merge 6696077ace ah/doc-attributes-text later to maint). + * Other code cleanup, docfix, build fix, etc. (merge f7111175df as/doc-markup-fix later to maint). (merge 90ff7c9898 fc/test-aggregation-clean-up later to maint). @@ -316,3 +343,6 @@ Fixes since v2.40 (merge fd72637423 ar/t2024-checkout-output-fix later to maint). (merge d45cbe3fe0 ob/sequencer-i18n-fix later to maint). (merge b734fe49fd ob/messages-capitalize-exception later to maint). + (merge ad353d7e77 ma/gittutorial-fixes later to maint). + (merge a5855fd8d4 ar/test-cleanup-unused-file-creation-part2 later to maint). + (merge 0c5308af30 sd/doc-gitignore-and-rm-cached later to maint). diff --git a/ReviewingGuidelines.html b/ReviewingGuidelines.html index cfd3df880..ed165b883 100644 --- a/ReviewingGuidelines.html +++ b/ReviewingGuidelines.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/SubmittingPatches.html b/SubmittingPatches.html index 8456789b0..bde3f0ced 100644 --- a/SubmittingPatches.html +++ b/SubmittingPatches.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/ToolsForGit.html b/ToolsForGit.html index 11d30b41e..e0aabcb8e 100644 --- a/ToolsForGit.html +++ b/ToolsForGit.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/everyday.html b/everyday.html index d01a70237..faace1c27 100644 --- a/everyday.html +++ b/everyday.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/git-credential.html b/git-credential.html index f8f552f6b..c355f9e8c 100644 --- a/git-credential.html +++ b/git-credential.html @@ -930,6 +930,16 @@ attributes is terminated by a blank line or end-of-file.

+oauth_refresh_token +
+
+

+ An OAuth refresh token may accompany a password that is an OAuth access + token. Helpers must treat this attribute as confidential like the password + attribute. Git itself has no special behaviour for this attribute. +

+
+
url
@@ -976,7 +986,7 @@ to pass additional information to credential helpers.

diff --git a/git-credential.txt b/git-credential.txt index 3394c0361..0e6d9e85e 100644 --- a/git-credential.txt +++ b/git-credential.txt @@ -156,6 +156,12 @@ Git understands the following attributes: When reading credentials from helpers, `git credential fill` ignores expired passwords. Represented as Unix time UTC, seconds since 1970. +`oauth_refresh_token`:: + + An OAuth refresh token may accompany a password that is an OAuth access + token. Helpers must treat this attribute as confidential like the password + attribute. Git itself has no special behaviour for this attribute. + `url`:: When this special attribute is read by `git credential`, the diff --git a/git-remote-helpers.html b/git-remote-helpers.html index bbd331928..b344b7ef1 100644 --- a/git-remote-helpers.html +++ b/git-remote-helpers.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/gitattributes.html b/gitattributes.html index ee3d74b84..9fcd7d64c 100644 --- a/gitattributes.html +++ b/gitattributes.html @@ -876,14 +876,12 @@ Git stores the contents you prepare in the working tree in the repository upon git add and git commit.

text

-

This attribute enables and controls end-of-line normalization. When a -text file is normalized, its line endings are converted to LF in the -repository. To control what line ending style is used in the working -directory, use the eol attribute for a single file and the -core.eol configuration variable for all text files. -Note that setting core.autocrlf to true or input overrides -core.eol (see the definitions of those options in -git-config(1)).

+

This attribute marks the path as a text file, which enables end-of-line +conversion: When a matching file is added to the index, the file’s line +endings are normalized to LF in the index. Conversely, when the file is +copied from the index to the working directory, its line endings may be +converted from LF to CRLF depending on the eol attribute, the Git +config, and the platform (see explanation of eol below).

Set @@ -891,8 +889,9 @@ Set

Setting the text attribute on a path enables end-of-line - normalization and marks the path as a text file. End-of-line - conversion takes place without guessing the content type. + conversion on checkin and checkout as described above. Line endings + are normalized to LF in the index every time the file is checked in, + even if the file was previously added to Git with CRLF line endings.

@@ -909,10 +908,11 @@ Set to string value "auto"

- When text is set to "auto", the path is marked for automatic - end-of-line conversion. If Git decides that the content is - text, its line endings are converted to LF on checkin. - When the file has been committed with CRLF, no conversion is done. + When text is set to "auto", Git decides by itself whether the file + is text or binary. If it is text and the file was not already in + Git with CRLF endings, line endings are converted on checkin and + checkout as described above. Otherwise, no conversion is done on + checkin or checkout.

@@ -931,23 +931,18 @@ unspecified.

eol

-

This attribute sets a specific line-ending style to be used in the -working directory. This attribute has effect only if the text -attribute is set or unspecified, or if it is set to auto, the file is -detected as text, and it is stored with LF endings in the index. Note -that setting this attribute on paths which are in the index with CRLF -line endings may make the paths to be considered dirty unless -text=auto is set. Adding the path to the index again will normalize -the line endings in the index.

+

This attribute marks a path to use a specific line-ending style in the +working tree when it is checked out. It has effect only if text or +text=auto is set (see above), but specifying eol automatically sets +text if text was left unspecified.

Set to string value "crlf"

- This setting forces Git to normalize line endings for this - file on checkin and convert them to CRLF when the file is - checked out. + This setting converts the file’s line endings in the working + directory to CRLF when the file is checked out.

@@ -955,9 +950,21 @@ Set to string value "lf"

- This setting forces Git to normalize line endings to LF on - checkin and prevents conversion to CRLF when the file is - checked out. + This setting uses the same line endings in the working directory as + in the index when the file is checked out. +

+
+
+Unspecified +
+
+

+ If the eol attribute is unspecified for a file, its line endings + in the working directory are determined by the core.autocrlf or + core.eol configuration variable (see the definitions of those + options in git-config(1)). If text is set but neither of + those variables is, the default is eol=crlf on Windows and + eol=lf on all other platforms.

@@ -2236,7 +2243,7 @@ frotz unspecified diff --git a/gitattributes.txt b/gitattributes.txt index 39bfbca1f..02a3ec83e 100644 --- a/gitattributes.txt +++ b/gitattributes.txt @@ -120,20 +120,19 @@ repository upon 'git add' and 'git commit'. `text` ^^^^^^ -This attribute enables and controls end-of-line normalization. When a -text file is normalized, its line endings are converted to LF in the -repository. To control what line ending style is used in the working -directory, use the `eol` attribute for a single file and the -`core.eol` configuration variable for all text files. -Note that setting `core.autocrlf` to `true` or `input` overrides -`core.eol` (see the definitions of those options in -linkgit:git-config[1]). +This attribute marks the path as a text file, which enables end-of-line +conversion: When a matching file is added to the index, the file's line +endings are normalized to LF in the index. Conversely, when the file is +copied from the index to the working directory, its line endings may be +converted from LF to CRLF depending on the `eol` attribute, the Git +config, and the platform (see explanation of `eol` below). Set:: Setting the `text` attribute on a path enables end-of-line - normalization and marks the path as a text file. End-of-line - conversion takes place without guessing the content type. + conversion on checkin and checkout as described above. Line endings + are normalized to LF in the index every time the file is checked in, + even if the file was previously added to Git with CRLF line endings. Unset:: @@ -142,10 +141,11 @@ Unset:: Set to string value "auto":: - When `text` is set to "auto", the path is marked for automatic - end-of-line conversion. If Git decides that the content is - text, its line endings are converted to LF on checkin. - When the file has been committed with CRLF, no conversion is done. + When `text` is set to "auto", Git decides by itself whether the file + is text or binary. If it is text and the file was not already in + Git with CRLF endings, line endings are converted on checkin and + checkout as described above. Otherwise, no conversion is done on + checkin or checkout. Unspecified:: @@ -159,26 +159,29 @@ unspecified. `eol` ^^^^^ -This attribute sets a specific line-ending style to be used in the -working directory. This attribute has effect only if the `text` -attribute is set or unspecified, or if it is set to `auto`, the file is -detected as text, and it is stored with LF endings in the index. Note -that setting this attribute on paths which are in the index with CRLF -line endings may make the paths to be considered dirty unless -`text=auto` is set. Adding the path to the index again will normalize -the line endings in the index. +This attribute marks a path to use a specific line-ending style in the +working tree when it is checked out. It has effect only if `text` or +`text=auto` is set (see above), but specifying `eol` automatically sets +`text` if `text` was left unspecified. Set to string value "crlf":: - This setting forces Git to normalize line endings for this - file on checkin and convert them to CRLF when the file is - checked out. + This setting converts the file's line endings in the working + directory to CRLF when the file is checked out. Set to string value "lf":: - This setting forces Git to normalize line endings to LF on - checkin and prevents conversion to CRLF when the file is - checked out. + This setting uses the same line endings in the working directory as + in the index when the file is checked out. + +Unspecified:: + + If the `eol` attribute is unspecified for a file, its line endings + in the working directory are determined by the `core.autocrlf` or + `core.eol` configuration variable (see the definitions of those + options in linkgit:git-config[1]). If `text` is set but neither of + those variables is, the default is `eol=crlf` on Windows and + `eol=lf` on all other platforms. Backwards compatibility with `crlf` attribute ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/githooks.html b/githooks.html index 0a81d1fe0..841c9b84e 100644 --- a/githooks.html +++ b/githooks.html @@ -1286,10 +1286,27 @@ processed by rebase.

sendemail-validate

-

This hook is invoked by git-send-email(1). It takes a single parameter, -the name of the file that holds the e-mail to be sent. Exiting with a -non-zero status causes git send-email to abort before sending any -e-mails.

+

This hook is invoked by git-send-email(1).

+

It takes these command line arguments. They are, +1. the name of the file which holds the contents of the email to be sent. +2. The name of the file which holds the SMTP headers of the email.

+

The SMTP headers are passed in the exact same way as they are passed to the +user’s Mail Transport Agent (MTA). In effect, the email given to the user’s +MTA, is the contents of $2 followed by the contents of $1.

+

An example of a few common headers is shown below. Take notice of the +capitalization and multi-line tab structure.

+
+
+
From: Example <from@example.com>
+To: to@example.com
+Cc: cc@example.com,
+        A <author@example.com>,
+        One <one@example.com>,
+        two@example.com
+Subject: PATCH-STRING
+
+

Exiting with a non-zero status causes git send-email to abort +before sending any e-mails.

The following environment variables are set when executing the hook.

@@ -1425,7 +1442,7 @@ running passing "1", "1" should not be possible.

diff --git a/githooks.txt b/githooks.txt index c8e55b261..86f804720 100644 --- a/githooks.txt +++ b/githooks.txt @@ -595,10 +595,29 @@ processed by rebase. sendemail-validate ~~~~~~~~~~~~~~~~~~ -This hook is invoked by linkgit:git-send-email[1]. It takes a single parameter, -the name of the file that holds the e-mail to be sent. Exiting with a -non-zero status causes `git send-email` to abort before sending any -e-mails. +This hook is invoked by linkgit:git-send-email[1]. + +It takes these command line arguments. They are, +1. the name of the file which holds the contents of the email to be sent. +2. The name of the file which holds the SMTP headers of the email. + +The SMTP headers are passed in the exact same way as they are passed to the +user's Mail Transport Agent (MTA). In effect, the email given to the user's +MTA, is the contents of $2 followed by the contents of $1. + +An example of a few common headers is shown below. Take notice of the +capitalization and multi-line tab structure. + + From: Example + To: to@example.com + Cc: cc@example.com, + A , + One , + two@example.com + Subject: PATCH-STRING + +Exiting with a non-zero status causes `git send-email` to abort +before sending any e-mails. The following environment variables are set when executing the hook. diff --git a/gitignore.html b/gitignore.html index 4252d5687..731f7c825 100644 --- a/gitignore.html +++ b/gitignore.html @@ -955,7 +955,9 @@ those in $GIT_DIR/info/exclude.

The purpose of gitignore files is to ensure that certain files not tracked by Git remain untracked.

To stop tracking a file that is currently tracked, use -git rm --cached.

+git rm --cached to remove the file from the index. The filename +can then be added to the .gitignore file to stop the file from +being reintroduced in later commits.

Git does not follow symbolic links when accessing a .gitignore file in the working tree. This keeps behavior consistent when the file is accessed from the index or a tree versus from the filesystem.

@@ -1071,7 +1073,7 @@ everything within foo/bar):

diff --git a/gitignore.txt b/gitignore.txt index f2738b10d..4c17f2356 100644 --- a/gitignore.txt +++ b/gitignore.txt @@ -146,7 +146,9 @@ The purpose of gitignore files is to ensure that certain files not tracked by Git remain untracked. To stop tracking a file that is currently tracked, use -'git rm --cached'. +'git rm --cached' to remove the file from the index. The filename +can then be added to the `.gitignore` file to stop the file from +being reintroduced in later commits. Git does not follow symbolic links when accessing a `.gitignore` file in the working tree. This keeps behavior consistent when the file is diff --git a/gittutorial.html b/gittutorial.html index 7475771f4..662c3b9eb 100644 --- a/gittutorial.html +++ b/gittutorial.html @@ -788,7 +788,7 @@ $ git config --global user.email you@yourdomain.example.com

Importing a new project

-

Assume you have a tarball project.tar.gz with your initial work. You +

Assume you have a tarball project.tar.gz with your initial work. You can place it under Git revision control as follows.

@@ -802,16 +802,16 @@ $ git init
Initialized empty Git repository in .git/

You’ve now initialized the working directory—you may notice a new -directory created, named ".git".

+directory created, named .git.

Next, tell Git to take a snapshot of the contents of all files under the -current directory (note the .), with git add:

+current directory (note the .), with git add:

$ git add .

This snapshot is now stored in a temporary staging area which Git calls the "index". You can permanently store the contents of the index in the -repository with git commit:

+repository with git commit:

$ git commit
@@ -829,20 +829,19 @@ version of your project in Git.

$ git add file1 file2 file3

You are now ready to commit. You can see what is about to be committed -using git diff with the --cached option:

+using git diff with the --cached option:

$ git diff --cached
-

(Without --cached, git diff will show you any changes that +

(Without --cached, git diff will show you any changes that you’ve made but not yet added to the index.) You can also get a brief -summary of the situation with git status:

+summary of the situation with git status:

$ git status
 On branch master
 Changes to be committed:
-Your branch is up to date with 'origin/master'.
   (use "git restore --staged <file>..." to unstage)
 
         modified:   file1
@@ -857,7 +856,7 @@ newly modified content to the index.  Finally, commit your changes with:

This will again prompt you for a message describing the change, and then record a new version of the project.

-

Alternatively, instead of running git add beforehand, you can use

+

Alternatively, instead of running git add beforehand, you can use

$ git commit -a
@@ -879,7 +878,7 @@ rest of the commit in the body.

Many revision control systems provide an add command that tells the system to start tracking changes to a new file. Git’s add command -does something simpler and more powerful: git add is used both for new +does something simpler and more powerful: git add is used both for new and newly modified files, and in both cases it takes a snapshot of the given files and stages that content in the index, ready for inclusion in the next commit.

@@ -910,7 +909,7 @@ each step

Managing branches

A single Git repository can maintain multiple branches of -development. To create a new branch named "experimental", use

+development. To create a new branch named experimental, use

$ git branch experimental
@@ -926,16 +925,16 @@ development. To create a new branch named "experimental", use

  experimental
 * master
-

The "experimental" branch is the one you just created, and the -"master" branch is a default branch that was created for you +

The experimental branch is the one you just created, and the +master branch is a default branch that was created for you automatically. The asterisk marks the branch you are currently on; type

$ git switch experimental
-

to switch to the experimental branch. Now edit a file, commit the -change, and switch back to the master branch:

+

to switch to the experimental branch. Now edit a file, commit the +change, and switch back to the master branch:

(edit file)
@@ -943,15 +942,15 @@ $ git commit -a
 $ git switch master

Check that the change you made is no longer visible, since it was -made on the experimental branch and you’re back on the master branch.

-

You can make a different change on the master branch:

+made on the experimental branch and you’re back on the master branch.

+

You can make a different change on the master branch:

(edit file)
 $ git commit -a

at this point the two branches have diverged, with different changes -made in each. To merge the changes made in experimental into master, run

+made in each. To merge the changes made in experimental into master, run

$ git merge experimental
@@ -974,14 +973,14 @@ conflicts,

$ gitk

will show a nice graphical representation of the resulting history.

-

At this point you could delete the experimental branch with

+

At this point you could delete the experimental branch with

$ git branch -d experimental
-

This command ensures that the changes in the experimental branch are +

This command ensures that the changes in the experimental branch are already in the current branch.

-

If you develop on a branch crazy-idea, then regret it, you can always +

If you develop on a branch crazy-idea, then regret it, you can always delete the branch with

@@ -995,14 +994,14 @@ out.

Using Git for collaboration

Suppose that Alice has started a new project with a Git repository in -/home/alice/project, and that Bob, who has a home directory on the +/home/alice/project, and that Bob, who has a home directory on the same machine, wants to contribute.

Bob begins with:

bob$ git clone /home/alice/project myrepo
-

This creates a new directory "myrepo" containing a clone of Alice’s +

This creates a new directory myrepo containing a clone of Alice’s repository. The clone is on an equal footing with the original project, possessing its own copy of the original project’s history.

Bob then makes some changes and commits them:

@@ -1013,27 +1012,27 @@ bob$ git commit -a (repeat as necessary)

When he’s ready, he tells Alice to pull changes from the repository -at /home/bob/myrepo. She does this with:

+at /home/bob/myrepo. She does this with:

alice$ cd /home/alice/project
 alice$ git pull /home/bob/myrepo master
-

This merges the changes from Bob’s "master" branch into Alice’s +

This merges the changes from Bob’s master branch into Alice’s current branch. If Alice has made her own changes in the meantime, then she may need to manually fix any conflicts.

-

The "pull" command thus performs two operations: it fetches changes +

The pull command thus performs two operations: it fetches changes from a remote branch, then merges them into the current branch.

Note that in general, Alice would want her local changes committed before -initiating this "pull". If Bob’s work conflicts with what Alice did since +initiating this pull. If Bob’s work conflicts with what Alice did since their histories forked, Alice will use her working tree and the index to resolve conflicts, and existing local changes will interfere with the conflict resolution process (Git will still perform the fetch but will refuse to merge — Alice will have to get rid of her local changes in some way and pull again when this happens).

-

Alice can peek at what Bob did without merging first, using the "fetch" +

Alice can peek at what Bob did without merging first, using the fetch command; this allows Alice to inspect what Bob did, using a special -symbol "FETCH_HEAD", in order to determine if he has anything worth +symbol FETCH_HEAD, in order to determine if he has anything worth pulling, like this:

@@ -1041,10 +1040,10 @@ pulling, like this:

alice$ git log -p HEAD..FETCH_HEAD

This operation is safe even if Alice has uncommitted local changes. -The range notation "HEAD..FETCH_HEAD" means "show everything that is reachable -from the FETCH_HEAD but exclude anything that is reachable from HEAD". -Alice already knows everything that leads to her current state (HEAD), -and reviews what Bob has in his state (FETCH_HEAD) that she has not +The range notation HEAD..FETCH_HEAD means "show everything that is reachable +from the FETCH_HEAD but exclude anything that is reachable from HEAD". +Alice already knows everything that leads to her current state (HEAD), +and reviews what Bob has in his state (FETCH_HEAD) that she has not seen with this command.

If Alice wants to visualize what Bob did since their histories forked she can issue the following command:

@@ -1052,7 +1051,7 @@ she can issue the following command:

$ gitk HEAD..FETCH_HEAD
-

This uses the same two-dot range notation we saw earlier with git log.

+

This uses the same two-dot range notation we saw earlier with git log.

Alice may want to view what both of them did since they forked. She can use three-dot form instead of the two-dot form:

@@ -1061,12 +1060,12 @@ She can use three-dot form instead of the two-dot form:

This means "show everything that is reachable from either one, but exclude anything that is reachable from both of them".

-

Please note that these range notation can be used with both gitk -and "git log".

+

Please note that these range notation can be used with both gitk +and git log.

After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob’s history does have something Alice would immediately need, Alice may choose to -stash her work-in-progress first, do a "pull", and then finally unstash +stash her work-in-progress first, do a pull, and then finally unstash her work-in-progress on top of the resulting history.

When you are working in a small closely knit group, it is not unusual to interact with the same repository over and over @@ -1076,15 +1075,15 @@ it easier:

alice$ git remote add bob /home/bob/myrepo
-

With this, Alice can perform the first part of the "pull" operation -alone using the git fetch command without merging them with her own +

With this, Alice can perform the first part of the pull operation +alone using the git fetch command without merging them with her own branch, using:

alice$ git fetch bob

Unlike the longhand form, when Alice fetches from Bob using a -remote repository shorthand set up with git remote, what was +remote repository shorthand set up with git remote, what was fetched is stored in a remote-tracking branch, in this case bob/master. So after this:

@@ -1092,9 +1091,9 @@ fetched is stored in a remote-tracking branch, in this case
alice$ git log -p master..bob/master

shows a list of all the changes that Bob made since he branched from -Alice’s master branch.

+Alice’s master branch.

After examining those changes, Alice -could merge the changes into her master branch:

+could merge the changes into her master branch:

alice$ git merge bob/master
@@ -1121,11 +1120,11 @@ used for pulls:

bob$ git config --get remote.origin.url
 /home/alice/project
-

(The complete configuration created by git clone is visible using +

(The complete configuration created by git clone is visible using git config -l, and the git-config(1) man page explains the meaning of each option.)

-

Git also keeps a pristine copy of Alice’s master branch under the -name "origin/master":

+

Git also keeps a pristine copy of Alice’s master branch under the +name origin/master:

bob$ git branch -r
@@ -1148,8 +1147,8 @@ that various users push changes to; see git-push(1)
 

Exploring history

Git history is represented as a series of interrelated commits. We -have already seen that the git log command can list those commits. -Note that first line of each git log entry also gives a name for the +have already seen that the git log command can list those commits. +Note that first line of each git log entry also gives a name for the commit:

@@ -1160,7 +1159,7 @@ Date: Tue May 16 17:18:22 2006 -0700 merge-base: Clarify the comments on post processing.
-

We can give this name to git show to see the details about this +

We can give this name to git show to see the details about this commit.

@@ -1194,7 +1193,7 @@ $ git show HEAD^2 # show the second parent of HEAD
$ git tag v2.5 1b2e1d63ff
-

you can refer to 1b2e1d63ff by the name "v2.5". If you intend to +

you can refer to 1b2e1d63ff by the name v2.5. If you intend to share this name with other people (for example, to identify a release version), you should create a "tag" object, and perhaps sign it; see git-tag(1) for details.

@@ -1211,19 +1210,19 @@ $ git reset --hard HEAD^ # reset your current branch and working

Be careful with that last command: in addition to losing any changes in the working directory, it will also remove all later commits from this branch. If this branch is the only branch containing those -commits, they will be lost. Also, don’t use git reset on a +commits, they will be lost. Also, don’t use git reset on a publicly-visible branch that other developers pull from, as it will force needless merges on other developers to clean up the history. -If you need to undo changes that you have pushed, use git revert +If you need to undo changes that you have pushed, use git revert instead.

-

The git grep command can search for strings in any version of your +

The git grep command can search for strings in any version of your project, so

$ git grep "hello" v2.5
-

searches for all occurrences of "hello" in v2.5.

-

If you leave out the commit name, git grep will search any of the +

searches for all occurrences of "hello" in v2.5.

+

If you leave out the commit name, git grep will search any of the files it manages in your current directory. So

@@ -1231,7 +1230,7 @@ files it manages in your current directory. So

is a quick way to search just the files that are tracked by Git.

Many Git commands also take sets of commits, which can be specified -in a number of ways. Here are some examples with git log:

+in a number of ways. Here are some examples with git log:

$ git log v2.5..v2.6            # commits between v2.5 and v2.6
@@ -1240,35 +1239,35 @@ $ git log --since="2 weeks ago" # commits from the last 2 weeks
 $ git log v2.5.. Makefile       # commits since v2.5 which modify
                                 # Makefile
-

You can also give git log a "range" of commits where the first is not +

You can also give git log a "range" of commits where the first is not necessarily an ancestor of the second; for example, if the tips of -the branches "stable" and "master" diverged from a common +the branches stable and master diverged from a common commit some time ago, then

$ git log stable..master
-

will list commits made in the master branch but not in the +

will list commits made in the master branch but not in the stable branch, while

$ git log master..stable

will show the list of commits made on the stable branch but not -the master branch.

-

The git log command has a weakness: it must present commits in a +the master branch.

+

The git log command has a weakness: it must present commits in a list. When the history has lines of development that diverged and -then merged back together, the order in which git log presents +then merged back together, the order in which git log presents those commits is meaningless.

Most projects with multiple contributors (such as the Linux kernel, -or Git itself) have frequent merges, and gitk does a better job of +or Git itself) have frequent merges, and gitk does a better job of visualizing their history. For example,

$ gitk --since="2 weeks ago" drivers/

allows you to browse any commits from the last 2 weeks of commits -that modified files under the "drivers" directory. (Note: you can +that modified files under the drivers directory. (Note: you can adjust gitk’s fonts by holding down the control key while pressing "-" or "+".)

Finally, most commands that take filenames will optionally allow you @@ -1278,7 +1277,7 @@ of the file:

$ git diff v2.5:Makefile HEAD:Makefile.in
-

You can also use git show to see any such file:

+

You can also use git show to see any such file:

$ git show v2.5:Makefile
@@ -1326,7 +1325,7 @@ digressions that may be interesting at this point are:

git-bisect(1): When there is a regression in your project, one way to track down the bug is by searching through - the history to find the exact commit that’s to blame. Git bisect + the history to find the exact commit that’s to blame. git bisect can help you perform a binary search for that commit. It is smart enough to perform a close-to-optimal search even in the case of complex non-linear history with lots of merged branches. @@ -1375,7 +1374,7 @@ digressions that may be interesting at this point are:

diff --git a/gittutorial.txt b/gittutorial.txt index 0e0b86310..c7cadd8aa 100644 --- a/gittutorial.txt +++ b/gittutorial.txt @@ -49,7 +49,7 @@ $ git config --global user.email you@yourdomain.example.com Importing a new project ----------------------- -Assume you have a tarball project.tar.gz with your initial work. You +Assume you have a tarball `project.tar.gz` with your initial work. You can place it under Git revision control as follows. ------------------------------------------------ @@ -65,10 +65,10 @@ Initialized empty Git repository in .git/ ------------------------------------------------ You've now initialized the working directory--you may notice a new -directory created, named ".git". +directory created, named `.git`. Next, tell Git to take a snapshot of the contents of all files under the -current directory (note the '.'), with 'git add': +current directory (note the `.`), with `git add`: ------------------------------------------------ $ git add . @@ -76,7 +76,7 @@ $ git add . This snapshot is now stored in a temporary staging area which Git calls the "index". You can permanently store the contents of the index in the -repository with 'git commit': +repository with `git commit`: ------------------------------------------------ $ git commit @@ -95,21 +95,20 @@ $ git add file1 file2 file3 ------------------------------------------------ You are now ready to commit. You can see what is about to be committed -using 'git diff' with the --cached option: +using `git diff` with the `--cached` option: ------------------------------------------------ $ git diff --cached ------------------------------------------------ -(Without --cached, 'git diff' will show you any changes that +(Without `--cached`, `git diff` will show you any changes that you've made but not yet added to the index.) You can also get a brief -summary of the situation with 'git status': +summary of the situation with `git status`: ------------------------------------------------ $ git status On branch master Changes to be committed: -Your branch is up to date with 'origin/master'. (use "git restore --staged ..." to unstage) modified: file1 @@ -128,7 +127,7 @@ $ git commit This will again prompt you for a message describing the change, and then record a new version of the project. -Alternatively, instead of running 'git add' beforehand, you can use +Alternatively, instead of running `git add` beforehand, you can use ------------------------------------------------ $ git commit -a @@ -151,7 +150,7 @@ Git tracks content not files Many revision control systems provide an `add` command that tells the system to start tracking changes to a new file. Git's `add` command -does something simpler and more powerful: 'git add' is used both for new +does something simpler and more powerful: `git add` is used both for new and newly modified files, and in both cases it takes a snapshot of the given files and stages that content in the index, ready for inclusion in the next commit. @@ -182,7 +181,7 @@ Managing branches ----------------- A single Git repository can maintain multiple branches of -development. To create a new branch named "experimental", use +development. To create a new branch named `experimental`, use ------------------------------------------------ $ git branch experimental @@ -201,8 +200,8 @@ you'll get a list of all existing branches: * master ------------------------------------------------ -The "experimental" branch is the one you just created, and the -"master" branch is a default branch that was created for you +The `experimental` branch is the one you just created, and the +`master` branch is a default branch that was created for you automatically. The asterisk marks the branch you are currently on; type @@ -210,8 +209,8 @@ type $ git switch experimental ------------------------------------------------ -to switch to the experimental branch. Now edit a file, commit the -change, and switch back to the master branch: +to switch to the `experimental` branch. Now edit a file, commit the +change, and switch back to the `master` branch: ------------------------------------------------ (edit file) @@ -220,9 +219,9 @@ $ git switch master ------------------------------------------------ Check that the change you made is no longer visible, since it was -made on the experimental branch and you're back on the master branch. +made on the `experimental` branch and you're back on the `master` branch. -You can make a different change on the master branch: +You can make a different change on the `master` branch: ------------------------------------------------ (edit file) @@ -230,7 +229,7 @@ $ git commit -a ------------------------------------------------ at this point the two branches have diverged, with different changes -made in each. To merge the changes made in experimental into master, run +made in each. To merge the changes made in `experimental` into `master`, run ------------------------------------------------ $ git merge experimental @@ -258,16 +257,16 @@ $ gitk will show a nice graphical representation of the resulting history. -At this point you could delete the experimental branch with +At this point you could delete the `experimental` branch with ------------------------------------------------ $ git branch -d experimental ------------------------------------------------ -This command ensures that the changes in the experimental branch are +This command ensures that the changes in the `experimental` branch are already in the current branch. -If you develop on a branch crazy-idea, then regret it, you can always +If you develop on a branch `crazy-idea`, then regret it, you can always delete the branch with ------------------------------------- @@ -281,7 +280,7 @@ Using Git for collaboration --------------------------- Suppose that Alice has started a new project with a Git repository in -/home/alice/project, and that Bob, who has a home directory on the +`/home/alice/project`, and that Bob, who has a home directory on the same machine, wants to contribute. Bob begins with: @@ -290,7 +289,7 @@ Bob begins with: bob$ git clone /home/alice/project myrepo ------------------------------------------------ -This creates a new directory "myrepo" containing a clone of Alice's +This creates a new directory `myrepo` containing a clone of Alice's repository. The clone is on an equal footing with the original project, possessing its own copy of the original project's history. @@ -303,31 +302,31 @@ bob$ git commit -a ------------------------------------------------ When he's ready, he tells Alice to pull changes from the repository -at /home/bob/myrepo. She does this with: +at `/home/bob/myrepo`. She does this with: ------------------------------------------------ alice$ cd /home/alice/project alice$ git pull /home/bob/myrepo master ------------------------------------------------ -This merges the changes from Bob's "master" branch into Alice's +This merges the changes from Bob's `master` branch into Alice's current branch. If Alice has made her own changes in the meantime, then she may need to manually fix any conflicts. -The "pull" command thus performs two operations: it fetches changes +The `pull` command thus performs two operations: it fetches changes from a remote branch, then merges them into the current branch. Note that in general, Alice would want her local changes committed before -initiating this "pull". If Bob's work conflicts with what Alice did since +initiating this `pull`. If Bob's work conflicts with what Alice did since their histories forked, Alice will use her working tree and the index to resolve conflicts, and existing local changes will interfere with the conflict resolution process (Git will still perform the fetch but will refuse to merge -- Alice will have to get rid of her local changes in some way and pull again when this happens). -Alice can peek at what Bob did without merging first, using the "fetch" +Alice can peek at what Bob did without merging first, using the `fetch` command; this allows Alice to inspect what Bob did, using a special -symbol "FETCH_HEAD", in order to determine if he has anything worth +symbol `FETCH_HEAD`, in order to determine if he has anything worth pulling, like this: ------------------------------------------------ @@ -336,10 +335,10 @@ alice$ git log -p HEAD..FETCH_HEAD ------------------------------------------------ This operation is safe even if Alice has uncommitted local changes. -The range notation "HEAD..FETCH_HEAD" means "show everything that is reachable -from the FETCH_HEAD but exclude anything that is reachable from HEAD". -Alice already knows everything that leads to her current state (HEAD), -and reviews what Bob has in his state (FETCH_HEAD) that she has not +The range notation `HEAD..FETCH_HEAD` means "show everything that is reachable +from the `FETCH_HEAD` but exclude anything that is reachable from `HEAD`". +Alice already knows everything that leads to her current state (`HEAD`), +and reviews what Bob has in his state (`FETCH_HEAD`) that she has not seen with this command. If Alice wants to visualize what Bob did since their histories forked @@ -349,7 +348,7 @@ she can issue the following command: $ gitk HEAD..FETCH_HEAD ------------------------------------------------ -This uses the same two-dot range notation we saw earlier with 'git log'. +This uses the same two-dot range notation we saw earlier with `git log`. Alice may want to view what both of them did since they forked. She can use three-dot form instead of the two-dot form: @@ -361,13 +360,13 @@ $ gitk HEAD...FETCH_HEAD This means "show everything that is reachable from either one, but exclude anything that is reachable from both of them". -Please note that these range notation can be used with both gitk -and "git log". +Please note that these range notation can be used with both `gitk` +and `git log`. After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob's history does have something Alice would immediately need, Alice may choose to -stash her work-in-progress first, do a "pull", and then finally unstash +stash her work-in-progress first, do a `pull`, and then finally unstash her work-in-progress on top of the resulting history. When you are working in a small closely knit group, it is not @@ -379,8 +378,8 @@ it easier: alice$ git remote add bob /home/bob/myrepo ------------------------------------------------ -With this, Alice can perform the first part of the "pull" operation -alone using the 'git fetch' command without merging them with her own +With this, Alice can perform the first part of the `pull` operation +alone using the `git fetch` command without merging them with her own branch, using: ------------------------------------- @@ -388,7 +387,7 @@ alice$ git fetch bob ------------------------------------- Unlike the longhand form, when Alice fetches from Bob using a -remote repository shorthand set up with 'git remote', what was +remote repository shorthand set up with `git remote`, what was fetched is stored in a remote-tracking branch, in this case `bob/master`. So after this: @@ -397,10 +396,10 @@ alice$ git log -p master..bob/master ------------------------------------- shows a list of all the changes that Bob made since he branched from -Alice's master branch. +Alice's `master` branch. After examining those changes, Alice -could merge the changes into her master branch: +could merge the changes into her `master` branch: ------------------------------------- alice$ git merge bob/master @@ -432,12 +431,12 @@ bob$ git config --get remote.origin.url /home/alice/project ------------------------------------- -(The complete configuration created by 'git clone' is visible using +(The complete configuration created by `git clone` is visible using `git config -l`, and the linkgit:git-config[1] man page explains the meaning of each option.) -Git also keeps a pristine copy of Alice's master branch under the -name "origin/master": +Git also keeps a pristine copy of Alice's `master` branch under the +name `origin/master`: ------------------------------------- bob$ git branch -r @@ -462,8 +461,8 @@ Exploring history ----------------- Git history is represented as a series of interrelated commits. We -have already seen that the 'git log' command can list those commits. -Note that first line of each git log entry also gives a name for the +have already seen that the `git log` command can list those commits. +Note that first line of each `git log` entry also gives a name for the commit: ------------------------------------- @@ -475,7 +474,7 @@ Date: Tue May 16 17:18:22 2006 -0700 merge-base: Clarify the comments on post processing. ------------------------------------- -We can give this name to 'git show' to see the details about this +We can give this name to `git show` to see the details about this commit. ------------------------------------- @@ -514,7 +513,7 @@ You can also give commits names of your own; after running $ git tag v2.5 1b2e1d63ff ------------------------------------- -you can refer to 1b2e1d63ff by the name "v2.5". If you intend to +you can refer to `1b2e1d63ff` by the name `v2.5`. If you intend to share this name with other people (for example, to identify a release version), you should create a "tag" object, and perhaps sign it; see linkgit:git-tag[1] for details. @@ -533,22 +532,22 @@ $ git reset --hard HEAD^ # reset your current branch and working Be careful with that last command: in addition to losing any changes in the working directory, it will also remove all later commits from this branch. If this branch is the only branch containing those -commits, they will be lost. Also, don't use 'git reset' on a +commits, they will be lost. Also, don't use `git reset` on a publicly-visible branch that other developers pull from, as it will force needless merges on other developers to clean up the history. -If you need to undo changes that you have pushed, use 'git revert' +If you need to undo changes that you have pushed, use `git revert` instead. -The 'git grep' command can search for strings in any version of your +The `git grep` command can search for strings in any version of your project, so ------------------------------------- $ git grep "hello" v2.5 ------------------------------------- -searches for all occurrences of "hello" in v2.5. +searches for all occurrences of "hello" in `v2.5`. -If you leave out the commit name, 'git grep' will search any of the +If you leave out the commit name, `git grep` will search any of the files it manages in your current directory. So ------------------------------------- @@ -558,7 +557,7 @@ $ git grep "hello" is a quick way to search just the files that are tracked by Git. Many Git commands also take sets of commits, which can be specified -in a number of ways. Here are some examples with 'git log': +in a number of ways. Here are some examples with `git log`: ------------------------------------- $ git log v2.5..v2.6 # commits between v2.5 and v2.6 @@ -568,16 +567,16 @@ $ git log v2.5.. Makefile # commits since v2.5 which modify # Makefile ------------------------------------- -You can also give 'git log' a "range" of commits where the first is not +You can also give `git log` a "range" of commits where the first is not necessarily an ancestor of the second; for example, if the tips of -the branches "stable" and "master" diverged from a common +the branches `stable` and `master` diverged from a common commit some time ago, then ------------------------------------- $ git log stable..master ------------------------------------- -will list commits made in the master branch but not in the +will list commits made in the `master` branch but not in the stable branch, while ------------------------------------- @@ -585,15 +584,15 @@ $ git log master..stable ------------------------------------- will show the list of commits made on the stable branch but not -the master branch. +the `master` branch. -The 'git log' command has a weakness: it must present commits in a +The `git log` command has a weakness: it must present commits in a list. When the history has lines of development that diverged and -then merged back together, the order in which 'git log' presents +then merged back together, the order in which `git log` presents those commits is meaningless. Most projects with multiple contributors (such as the Linux kernel, -or Git itself) have frequent merges, and 'gitk' does a better job of +or Git itself) have frequent merges, and `gitk` does a better job of visualizing their history. For example, ------------------------------------- @@ -601,7 +600,7 @@ $ gitk --since="2 weeks ago" drivers/ ------------------------------------- allows you to browse any commits from the last 2 weeks of commits -that modified files under the "drivers" directory. (Note: you can +that modified files under the `drivers` directory. (Note: you can adjust gitk's fonts by holding down the control key while pressing "-" or "+".) @@ -613,7 +612,7 @@ of the file: $ git diff v2.5:Makefile HEAD:Makefile.in ------------------------------------- -You can also use 'git show' to see any such file: +You can also use `git show` to see any such file: ------------------------------------- $ git show v2.5:Makefile @@ -649,7 +648,7 @@ digressions that may be interesting at this point are: * linkgit:git-bisect[1]: When there is a regression in your project, one way to track down the bug is by searching through - the history to find the exact commit that's to blame. Git bisect + the history to find the exact commit that's to blame. `git bisect` can help you perform a binary search for that commit. It is smart enough to perform a close-to-optimal search even in the case of complex non-linear history with lots of merged branches. diff --git a/howto/coordinate-embargoed-releases.html b/howto/coordinate-embargoed-releases.html index 5db2b1247..a109e0c58 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 ce859673c..49c16864f 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 eaa011844..5def17a1e 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 c0e89e6ec..e6a660e08 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 5d5004256..d90c9ec92 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 f7566b359..6aa5bf57c 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 3b22e9416..19ba44fc4 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 2b87526d0..9b65dcce7 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 384c0855f..84005c80a 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 a64eb743d..debc95e76 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 93b5c3a8c..09454729d 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 cfa49d22b..3d293164e 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 d4259aa69..86b86bc2d 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 d3b1b8e36..d82407444 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 c54a0d258..2ad963715 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 b5a021ea8..eba6b2b57 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 9f2a5cbdb..b666fb418 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 b2bbf5265..5d7cb4b34 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 8016a4462..6e525b045 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 76f9f8444..13e4140dc 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 0ea662936..a865df21e 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 479df5b04..db2ddc1e0 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 27bda2d14..74e9fad65 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 86a939993..4f4c6164f 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 49cbfe58e..2dd23f538 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 6f9eeefd6..061c1d40f 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 fc74159a0..07e77a238 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 2f183cff1..097e17648 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 59f1640aa..8a926b6df 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 f2c820492..ae7dda9b6 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 c6bb8c892..f5799aaaa 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 f742d01ce..86f7a0b3d 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 d063fe1ca..46d59ff0c 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 962a6a173..b59ddf7a2 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 d881579aa..228661830 100644 --- a/technical/trivial-merge.html +++ b/technical/trivial-merge.html @@ -735,7 +735,7 @@ asciidoc.install();
diff --git a/user-manual.html b/user-manual.html index fb35fb243..1a1ea6293 100644 --- a/user-manual.html +++ b/user-manual.html @@ -1,5 +1,5 @@ -Git User Manual

Git User Manual

Revision History
2023-05-09

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
2023-05-10

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 -- cgit 1.2.3-korg