From e4050adb4e95c44057735cf08f3bd330c030229a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 17 Jan 2007 20:25:29 +0000 Subject: [PATCH] Autogenerated man pages for v1.5.0-rc1-g556b --- man1/git-add.1 | 4 +-- man1/git-checkout.1 | 63 +++++++++++++++++++---------------------- man1/git-format-patch.1 | 47 ++++++++++++++---------------- man7/git.7 | 2 +- 4 files changed, 54 insertions(+), 62 deletions(-) diff --git a/man1/git-add.1 b/man1/git-add.1 index ca5da48cc..ab9cacb6f 100644 --- a/man1/git-add.1 +++ b/man1/git-add.1 @@ -10,7 +10,7 @@ .SH "NAME" git\-add \- Add file contents to the changeset to be committed next .SH "SYNOPSIS" -\fIgit\-add\fR [\-n] [\-v] [\-f] [\-\-interactive] [\-\-] \&... +\fIgit\-add\fR [\-n] [\-v] [\-f] [\-\-interactive | \-i] [\-\-] \&... .SH "DESCRIPTION" All the changed file contents to be committed together in a single set of changes must be "added" with the \fIadd\fR command before using the \fIcommit\fR command. This is not only for adding new files. Even modified files must be added to the set of changes about to be committed. @@ -35,7 +35,7 @@ Be verbose. \-f Allow adding otherwise ignored files. .TP -\-\-interactive +\\i, \-\-interactive Add modified contents in the working tree interactively to the index. .TP \-\- diff --git a/man1/git-checkout.1 b/man1/git-checkout.1 index fbd28e406..874b86361 100644 --- a/man1/git-checkout.1 +++ b/man1/git-checkout.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-CHECKOUT" "1" "10/03/2006" "" "" +.TH "GIT\-CHECKOUT" "1" "01/17/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -13,44 +13,52 @@ git\-checkout \- Checkout and switch to a branch .sp .nf \fIgit\-checkout\fR [\-f] [\-b [\-l]] [\-m] [] -\fIgit\-checkout\fR [\-m] [] \&... +\fIgit\-checkout\fR [] \&... .fi .SH "DESCRIPTION" When are not given, this command switches branches by updating the index and working tree to reflect the specified branch, , and updating HEAD to be or, if specified, . Using \-b will cause to be created. -.sp + When are given, this command does \fBnot\fR switch branches. It updates the named paths in the working tree from the index file (i.e. it runs git\-checkout\-index \-f \-u). In this case, \-f and \-b options are meaningless and giving either of them results in an error. argument can be used to specify a specific tree\-ish to update the index for the given paths before updating the working tree. -.sp .SH "OPTIONS" .TP \-f Force a re\-read of everything. .TP \-b -Create a new branch named and start it at . The new branch name must pass all checks defined by -\fBgit\-check\-ref\-format\fR(1). Some of these checks may restrict the characters allowed in a branch name. +Create a new branch named and start it at . The new branch name must pass all checks defined by \fBgit\-check\-ref\-format\fR(1). Some of these checks may restrict the characters allowed in a branch name. .TP \-l Create the new branch's ref log. This activates recording of all changes to made the branch ref, enabling use of date .TP \-m If you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. However, with this option, a three\-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch. -.sp -When a merge conflict happens, the index entries for conflicting paths are left unmerged, and you need to resolve the conflicts and mark the resolved paths with -git update\-index. + +When a merge conflict happens, the index entries for conflicting paths are left unmerged, and you need to resolve the conflicts and mark the resolved paths with git update\-index. .TP Name for the new branch. .TP Branch to checkout; may be any object ID that resolves to a commit. Defaults to HEAD. + +When this parameter names a non\-branch (but still a valid commit object), your HEAD becomes \fIdetached\fR. +.SH "DETACHED HEAD" +It is sometimes useful to be able to \fIcheckout\fR a commit that is not at the tip of one of your branches. The most obvious example is to check out the commit at a tagged official release point, like this: +.sp +.nf +$ git checkout v2.6.18 +.fi +Earlier versions of git did not allow this and asked you to create a temporary branch using \-b option, but starting from version 1.5.0, the above command \fIdetaches\fR your HEAD from the current branch and directly point at the commit named by the tag (v2.6.18 in the above example). + +You can use usual git commands while in this state. You can use git\-reset \-\-hard $othercommit to further move around, for example. You can make changes and create a new commit on top of a detached HEAD. You can even create a merge by using git merge $othercommit. + +The state you are in while your HEAD is detached is not recorded by any branch (which is natural \-\-\- you are not on any branch). What this means is that you can discard your temporary commits and merges by switching back to an existing branch (e.g. git checkout master), and a later git prune or git gc would garbage\-collect them. + +The command would refuse to switch back to make sure that you do not discard your temporary state by mistake when your detached HEAD is not pointed at by any existing ref. If you did want to save your state (e.g. "I was interested in the fifth commit from the top of \fImaster\fR branch", or "I made two commits to fix minor bugs while on a detached HEAD" \(em and if you do not want to lose these facts), you can create a new branch and switch to it with git checkout \-b newbranch so that you can keep building on that state, or tag it first so that you can come back to it later and switch to the branch you wanted to switch to with git tag that_state; git checkout master. On the other hand, if you did want to discard the temporary state, you can give \-f option (e.g. git checkout \-f master) to override this behaviour. .SH "EXAMPLES" .TP 3 1. -The following sequence checks out the -master -branch, reverts the -Makefile -to two revisions back, deletes hello.c by mistake, and gets it back from the index. +The following sequence checks out the master branch, reverts the Makefile to two revisions back, deletes hello.c by mistake, and gets it back from the index. .sp .nf $ git checkout master \fB(1)\fR @@ -64,9 +72,8 @@ $ git checkout hello.c \fB(3)\fR \fB2. \fRtake out a file out of other commit .br \fB3. \fRrestore hello.c from HEAD of current branch -.sp -If you have an unfortunate branch that is named -hello.c, this step would be confused as an instruction to switch to that branch. You should instead write: + +If you have an unfortunate branch that is named hello.c, this step would be confused as an instruction to switch to that branch. You should instead write: .sp .nf $ git checkout \-\- hello.c @@ -85,22 +92,16 @@ However, your "wrong" branch and correct "mytopic" branch may differ in files th $ git checkout mytopic fatal: Entry 'frotz' not uptodate. Cannot merge. .fi -You can give the -\-m -flag to the command, which would try a three\-way merge: +You can give the \-m flag to the command, which would try a three\-way merge: .sp .nf $ git checkout \-m mytopic Auto\-merging frotz .fi -After this three\-way merge, the local modifications are _not_ registered in your index file, so -git diff -would show you what changes you made since the tip of the new branch. +After this three\-way merge, the local modifications are _not_ registered in your index file, so git diff would show you what changes you made since the tip of the new branch. .TP 3. -When a merge conflict happens during switching branches with the -\-m -option, you would see something like this: +When a merge conflict happens during switching branches with the \-m option, you would see something like this: .sp .nf $ git checkout \-m mytopic @@ -109,11 +110,7 @@ merge: warning: conflicts during merge ERROR: Merge conflict in frotz fatal: merge program failed .fi -At this point, -git diff -shows the changes cleanly merged as in the previous example, as well as the changes in the conflicted files. Edit and resolve the conflict and mark it resolved with -git update\-index -as usual: +At this point, git diff shows the changes cleanly merged as in the previous example, as well as the changes in the conflicted files. Edit and resolve the conflict and mark it resolved with git update\-index as usual: .sp .nf $ edit frotz @@ -121,10 +118,8 @@ $ git update\-index frotz .fi .SH "AUTHOR" Written by Linus Torvalds -.sp .SH "DOCUMENTATION" Documentation by Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp + diff --git a/man1/git-format-patch.1 b/man1/git-format-patch.1 index d6803a360..e8373ddc7 100644 --- a/man1/git-format-patch.1 +++ b/man1/git-format-patch.1 @@ -2,7 +2,7 @@ .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. -.TH "GIT\-FORMAT\-PATCH" "1" "10/03/2006" "" "" +.TH "GIT\-FORMAT\-PATCH" "1" "01/17/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) @@ -14,44 +14,37 @@ git\-format\-patch \- Prepare patches for e\-mail submission .nf \fIgit\-format\-patch\fR [\-n | \-k] [\-o | \-\-stdout] [\-\-attach] [\-\-thread] [\-s | \-\-signoff] [\-\-diff\-options] [\-\-start\-number ] - [\-\-in\-reply\-to=Message\-Id] + [\-\-in\-reply\-to=Message\-Id] [\-\-suffix=.] [..] .fi .SH "DESCRIPTION" Prepare each commit between and with its patch in one file per commit, formatted to resemble UNIX mailbox format. If .. is not specified, the head of the current working tree is implied. -.sp + The output of this command is convenient for e\-mail submission or for use with \fBgit\-am\fR(1). -.sp + Each output file is numbered sequentially from 1, and uses the first line of the commit message (massaged for pathname safety) as the filename. The names of the output files are printed to standard output, unless the \-\-stdout option is specified. -.sp + If \-o is specified, output files are created in . Otherwise they are created in the current working directory. -.sp + If \-n is specified, instead of "[PATCH] Subject", the first line is formatted as "[PATCH n/m] Subject". -.sp + If given \-\-thread, git\-format\-patch will generate In\-Reply\-To and References headers to make the second and subsequent patch mails appear as replies to the first mail; this also generates a Message\-Id header to reference. -.sp .SH "OPTIONS" .TP \-o|\-\-output\-directory Use to store the resulting files, instead of the current working directory. .TP \-n|\-\-numbered -Name output in -\fI[PATCH n/m]\fR -format. +Name output in \fI[PATCH n/m]\fR format. .TP \-\-start\-number Start numbering the patches at instead of 1. .TP \-k|\-\-keep\-subject -Do not strip/add -\fI[PATCH]\fR -from the first line of the commit log message. +Do not strip/add \fI[PATCH]\fR from the first line of the commit log message. .TP \-s|\-\-signoff -Add -Signed\-off\-by: -line to the commit message, using the committer identity of yourself. +Add Signed\-off\-by: line to the commit message, using the committer identity of yourself. .TP \-\-stdout Print all commits to the standard output in mbox format, instead of creating a file for each one. @@ -64,19 +57,26 @@ Add In\-Reply\-To and References headers to make the second and subsequent mails .TP \-\-in\-reply\-to=Message\-Id Make the first mail (or all the mails with \-\-no\-thread) appear as a reply to the given Message\-Id, which avoids breaking threads to provide a new patch series. +.TP +\-\-suffix=. +Instead of using .txt as the suffix for generated filenames, use specifed suffix. A common alternative is \-\-suffix=.patch. + +Note that you would need to include the leading dot . if you want a filename like 0001\-description\-of\-my\-change.patch, and the first letter does not have to be a dot. Leaving it empty would not add any suffix. .SH "CONFIGURATION" You can specify extra mail header lines to be added to each message in the repository configuration as follows: .sp -.sp .nf headers = "Organization: git\-foo\\n" .fi +You can specify default suffix used: +.sp +.nf +suffix = .patch +.fi .SH "EXAMPLES" .TP git\-format\-patch \-k \-\-stdout R1..R2 | git\-am \-3 \-k -Extract commits between revisions R1 and R2, and apply them on top of the current branch using -git\-am -to cherry\-pick them. +Extract commits between revisions R1 and R2, and apply them on top of the current branch using git\-am to cherry\-pick them. .TP git\-format\-patch origin Extract all commits which are in the current branch but not in the origin branch. For each commit a separate file is created in the current directory. @@ -85,13 +85,10 @@ git\-format\-patch \-M \-B origin The same as the previous one. Additionally, it detects and handles renames and complete rewrites intelligently to produce a renaming patch. A renaming patch reduces the amount of text output, and generally makes it easier to review it. Note that the "patch" program does not understand renaming patches, so use it only when you know the recipient uses git to apply your patch. .SH "SEE ALSO" \fBgit\-am\fR(1), \fBgit\-send\-email\fR(1) -.sp .SH "AUTHOR" Written by Junio C Hamano -.sp .SH "DOCUMENTATION" Documentation by Junio C Hamano and the git\-list . -.sp .SH "GIT" Part of the \fBgit\fR(7) suite -.sp + diff --git a/man7/git.7 b/man7/git.7 index 0a660c63b..a86e1052c 100644 --- a/man7/git.7 +++ b/man7/git.7 @@ -580,7 +580,7 @@ stupid. contemptible and despicable. simple. Take your pick from the dictionary \(bu "goddamn idiotic truckload of sh*t": when it breaks -This is a stupid (but extremely fast) directory content manager. It doesn't do a whole lot, but what it \fIdoes\fR do is track directory contents efficiently. +This is a (not so) stupid but extremely fast directory content manager. It doesn't do a whole lot at its core, but what it \fIdoes\fR do is track directory contents efficiently. There are two object abstractions: the "object database", and the "current directory cache" aka "index". .SS "The Object Database" -- 2.26.2