.\" 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\-APPLY" "1" "11/18/2006" "" ""
+.TH "GIT\-APPLY" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.fi
.SH "DESCRIPTION"
Reads supplied diff output and applies it on a git index file and a work tree.
-.sp
.SH "OPTIONS"
.TP
<patch>\&...
-The files to read patch from.
-\fI\-\fR
-can be used to read from the standard input.
+The files to read patch from. \fI\-\fR can be used to read from the standard input.
.TP
\-\-stat
Instead of applying the patch, output diffstat for the input. Turns off "apply".
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. Turns off "apply".
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0. Turns off "apply".
.TP
\-\-summary
Instead of applying the patch, output a condensed summary of information obtained from git diff extended headers, such as creations, renames and mode changes. Turns off "apply".
When \-\-check is in effect, or when applying the patch (which is the default when none of the options that disables it is in effect), make sure the patch is applicable to what the current index file records. If the file to be patched in the work tree is not up\-to\-date, it is flagged as an error. This flag also causes the index file to be updated.
.TP
\-\-cached
-Apply a patch without touching the working tree. Instead, take the cached data, apply the patch, and store the result in the index, without using the working tree. This implies
-\fI\-\-index\fR.
+Apply a patch without touching the working tree. Instead, take the cached data, apply the patch, and store the result in the index, without using the working tree. This implies \fI\-\-index\fR.
.TP
\-\-index\-info
-Newer git\-diff output has embedded
-\fIindex information\fR
-for each blob to help identify the original version that the patch applies to. When this flag is given, and if the original version of the blob is available locally, outputs information about them to the standard output.
+Newer git\-diff output has embedded \fIindex information\fR for each blob to help identify the original version that the patch applies to. When this flag is given, and if the original version of the blob is available locally, outputs information about them to the standard output.
.TP
\-R, \-\-reverse
Apply the patch in reverse.
.TP
\-\-reject
-For atomicity,
-\fBgit\-apply\fR(1)
-by default fails the whole patch and does not touch the working tree when some of the hunks do not apply. This option makes it apply the parts of the patch that are applicable, and leave the rejected hunks in corresponding *.rej files.
+For atomicity, \fBgit\-apply\fR(1) by default fails the whole patch and does not touch the working tree when some of the hunks do not apply. This option makes it apply the parts of the patch that are applicable, and leave the rejected hunks in corresponding *.rej files.
.TP
\-z
-When showing the index information, do not munge paths, but use NUL terminated machine readable format. Without this flag, the pathnames output will have TAB, LF, and backslash characters replaced with
-\\t,
-\\n, and
-\\\\, respectively.
+When showing the index information, do not munge paths, but use NUL terminated machine readable format. Without this flag, the pathnames output will have TAB, LF, and backslash characters replaced with \\t, \\n, and \\\\, respectively.
.TP
\-p<n>
Remove <n> leading slashes from traditional diff paths. The default is 1.
Ensure at least <n> lines of surrounding context match before and after each change. When fewer lines of surrounding context exist they all must match. By default no context is ever ignored.
.TP
\-\-unidiff\-zero
-By default,
-\fBgit\-apply\fR(1)
-expects that the patch being applied is a unified diff with at least one line of context. This provides good safety measures, but breaks down when applying a diff generated with \-\-unified=0. To bypass these checks use
-\fI\-\-unidiff\-zero\fR.
-.sp
+By default, \fBgit\-apply\fR(1) expects that the patch being applied is a unified diff with at least one line of context. This provides good safety measures, but breaks down when applying a diff generated with \-\-unified=0. To bypass these checks use \fI\-\-unidiff\-zero\fR.
+
Note, for the reasons stated above usage of context\-free patches are discouraged.
.TP
\-\-apply
-If you use any of the options marked "Turns off
-\fIapply\fR" above,
-\fBgit\-apply\fR(1)
-reads and outputs the information you asked without actually applying the patch. Give this flag after those flags to also apply the patch.
+If you use any of the options marked "Turns off \fIapply\fR" above, \fBgit\-apply\fR(1) reads and outputs the information you asked without actually applying the patch. Give this flag after those flags to also apply the patch.
.TP
\-\-no\-add
-When applying a patch, ignore additions made by the patch. This can be used to extract common part between two files by first running
-diff
-on them and applying the result with this option, which would apply the deletion part but not addition part.
+When applying a patch, ignore additions made by the patch. This can be used to extract common part between two files by first running diff on them and applying the result with this option, which would apply the deletion part but not addition part.
.TP
\-\-allow\-binary\-replacement, \-\-binary
Historically we did not allow binary patch applied without an explicit permission from the user, and this flag was the way to do so. Currently we always allow binary patch application, so this is a no\-op.
Don't apply changes to files matching the given path pattern. This can be useful when importing patchsets, where you want to exclude certain files or directories.
.TP
\-\-whitespace=<option>
-When applying a patch, detect a new or modified line that ends with trailing whitespaces (this includes a line that solely consists of whitespaces). By default, the command outputs warning messages and applies the patch. When
-\fBgit\-apply\fR(1)
-is used for statistics and not applying a patch, it defaults to
-nowarn. You can use different
-<option>
-to control this behavior:
+When applying a patch, detect a new or modified line that ends with trailing whitespaces (this includes a line that solely consists of whitespaces). By default, the command outputs warning messages and applies the patch. When \fBgit\-apply\fR(1) is used for statistics and not applying a patch, it defaults to nowarn. You can use different <option> to control this behavior:
.RS
.TP 3
\(bu
-nowarn
-turns off the trailing whitespace warning.
+nowarn turns off the trailing whitespace warning.
.TP
\(bu
-warn
-outputs warnings for a few such errors, but applies the patch (default).
+warn outputs warnings for a few such errors, but applies the patch (default).
.TP
\(bu
-error
-outputs warnings for a few such errors, and refuses to apply the patch.
+error outputs warnings for a few such errors, and refuses to apply the patch.
.TP
\(bu
-error\-all
-is similar to
-error
-but shows all errors.
+error\-all is similar to error but shows all errors.
.TP
\(bu
-strip
-outputs warnings for a few such errors, strips out the trailing whitespaces and applies the patch.
+strip outputs warnings for a few such errors, strips out the trailing whitespaces and applies the patch.
.RE
.TP
\-\-inaccurate\-eof
.SH "CONFIGURATION"
.TP
apply.whitespace
-When no
-\-\-whitespace
-flag is given from the command line, this configuration item is used as the default.
+When no \-\-whitespace flag is given from the command line, this configuration item is used as the default.
.SH "AUTHOR"
Written by Linus Torvalds <torvalds@osdl.org>
-.sp
.SH "DOCUMENTATION"
Documentation by Junio C Hamano
-.sp
.SH "GIT"
Part of the \fBgit\fR(7) suite
-.sp
+
.\" 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\-DIFF\-FILES" "1" "12/16/2006" "" ""
+.TH "GIT\-DIFF\-FILES" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
Generate a diffstat. You can override the default output width for 80\-column terminal by "\-\-stat=width". The width of the filename part can be controlled by giving another width to it separated by a comma.
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0.
.TP
\-\-shortstat
Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines.
.\" 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\-DIFF\-INDEX" "1" "12/16/2006" "" ""
+.TH "GIT\-DIFF\-INDEX" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
Generate a diffstat. You can override the default output width for 80\-column terminal by "\-\-stat=width". The width of the filename part can be controlled by giving another width to it separated by a comma.
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0.
.TP
\-\-shortstat
Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines.
.\" 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\-DIFF\-STAGES" "1" "12/16/2006" "" ""
+.TH "GIT\-DIFF\-STAGES" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
Generate a diffstat. You can override the default output width for 80\-column terminal by "\-\-stat=width". The width of the filename part can be controlled by giving another width to it separated by a comma.
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0.
.TP
\-\-shortstat
Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines.
.\" 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\-DIFF\-TREE" "1" "12/16/2006" "" ""
+.TH "GIT\-DIFF\-TREE" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
Generate a diffstat. You can override the default output width for 80\-column terminal by "\-\-stat=width". The width of the filename part can be controlled by giving another width to it separated by a comma.
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0.
.TP
\-\-shortstat
Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines.
.\" 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\-DIFF" "1" "12/21/2006" "" ""
+.TH "GIT\-DIFF" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
Generate a diffstat. You can override the default output width for 80\-column terminal by "\-\-stat=width". The width of the filename part can be controlled by giving another width to it separated by a comma.
.TP
\-\-numstat
-Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly.
+Similar to \-\-stat, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two \- instead of saying 0 0.
.TP
\-\-shortstat
Output only the last line of the \-\-stat format containing total number of modified files, as well as number of added and deleted lines.
.\" 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\-RESET" "1" "12/16/2006" "" ""
+.TH "GIT\-RESET" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.SH "NAME"
git\-reset \- Reset current HEAD to the specified state
.SH "SYNOPSIS"
-\fIgit\-reset\fR [\-\-mixed | \-\-soft | \-\-hard] [<commit\-ish>]
+.sp
+.nf
+\fIgit\-reset\fR [\-\-mixed | \-\-soft | \-\-hard] [<commit>]
+\fIgit\-reset\fR [\-\-mixed] <commit> [\-\-] <paths>\&...
+.fi
.SH "DESCRIPTION"
Sets the current head to the specified commit and optionally resets the index and working tree to match.
This command is useful if you notice some small error in a recent commit (or set of commits) and want to redo that part without showing the undo in the history.
If you want to undo a commit other than the latest on a branch, \fBgit\-revert\fR(1) is your friend.
+
+The second form with \fIpaths\fR is used to revert selected paths in the index from a given commit, without moving HEAD.
.SH "OPTIONS"
.TP
\-\-mixed
Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed files "Added but not yet committed", as \fBgit\-status\fR(1) would put it.
.TP
\-\-hard
-Matches the working tree and index to that of the tree being switched to. Any changes to tracked files in the working tree since <commit\-ish> are lost.
+Matches the working tree and index to that of the tree being switched to. Any changes to tracked files in the working tree since <commit> are lost.
.TP
-<commit\-ish>
+<commit>
Commit to make the current HEAD.
.SH "EXAMPLES"
.TP
.\" 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\-SHOW\-BRANCH" "1" "12/23/2006" "" ""
+.TH "GIT\-SHOW\-BRANCH" "1" "12/26/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
\fIgit\-show\-branch\fR [\-\-all] [\-\-remotes] [\-\-topo\-order] [\-\-current]
[\-\-more=<n> | \-\-list | \-\-independent | \-\-merge\-base]
[\-\-no\-name | \-\-sha1\-name] [\-\-topics] [<rev> | <glob>]\&...
+\fIgit\-show\-branch\fR \-\-reflog[=<n>] <ref>
.fi
.SH "DESCRIPTION"
Shows the commit ancestry graph starting from the commits named with <rev>s or <globs>s (or all refs under $GIT_DIR/refs/heads and/or $GIT_DIR/refs/tags) semi\-visually.
.TP
\-\-topics
Shows only commits that are NOT on the first branch given. This helps track topic branches by hiding any commit that is already in the main line of development. When given "git show\-branch \-\-topics master topic1 topic2", this will show the revisions given by "git rev\-list ^master topic1 topic2"
+.TP
+\-\-reflog[=<n>] <ref>
+Shows <n> most recent ref\-log entries for the given ref.
Note that \-\-more, \-\-list, \-\-independent and \-\-merge\-base options are mutually exclusive.
.SH "OUTPUT"