<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
<div class="verseblock">\r
-<div class="content"><em>git clean</em> [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>…</div></div>\r
+<div class="content"><em>git clean</em> [-d] [-f] [-n] [-q] [-x | -X] [--] <path>…</div></div>\r
</div>\r
<h2 id="_description">DESCRIPTION</h2>\r
<div class="sectionbody">\r
from files that are not under version control. If the <em>-x</em> option is\r
specified, ignored files are also removed, allowing to remove all\r
build products.\r
-When optional <tt><paths>…</tt> arguments are given, the paths\r
-affected are further limited to those that match them.</p></div>\r
+If any optional <tt><path>…</tt> arguments are given, only those paths\r
+are affected.</p></div>\r
</div>\r
<h2 id="_options">OPTIONS</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:16:38 UTC\r
+Last updated 2008-07-31 22:10:18 UTC\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
[verse]
-'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <paths>...
+'git clean' [-d] [-f] [-n] [-q] [-x | -X] [--] <path>...
DESCRIPTION
-----------
from files that are not under version control. If the '-x' option is
specified, ignored files are also removed, allowing to remove all
build products.
-When optional `<paths>...` arguments are given, the paths
-affected are further limited to those that match them.
+If any optional `<path>...` arguments are given, only those paths
+are affected.
OPTIONS
<div class="sectionbody">\r
<div class="vlist"><dl>\r
<dt>\r
-<committish>\r
+<committish>…\r
</dt>\r
<dd>\r
<p>\r
- The object name of the committish.\r
+ Committish object names to describe.\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-22 09:19:05 UTC\r
+Last updated 2008-07-31 22:10:18 UTC\r
</div>\r
</div>\r
</body>\r
OPTIONS
-------
-<committish>::
- The object name of the committish.
+<committish>...::
+ Committish object names to describe.
--all::
Instead of using only the annotated tags, use any ref
</p>\r
</dd>\r
<dt>\r
-<rev-list-options>\r
+<rev-list options>…\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-24 04:02:40 UTC\r
+Last updated 2008-07-31 22:10:18 UTC\r
</div>\r
</div>\r
</body>\r
directory or when there are already refs starting with
'refs/original/', unless forced.
-<rev-list-options>::
+<rev-list options>...::
When options are given after the new branch name, they will
be passed to 'git-rev-list'. Only commits in the resulting
output will be filtered, although the filtered commits can still
</p>\r
</dd>\r
<dt>\r
-<pattern>\r
+<pattern>…\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:16:47 UTC\r
+Last updated 2008-07-31 22:10:19 UTC\r
</div>\r
</div>\r
</body>\r
`xx`; for example `%00` interpolates to `\0` (NUL),
`%09` to `\t` (TAB) and `%0a` to `\n` (LF).
-<pattern>::
+<pattern>...::
If one or more patterns are given, only refs are shown that
match againt at least one pattern, either using fnmatch(3) or
literally, in the latter case matching completely or from the
</dt>\r
<dd>\r
<p>\r
- Without this flag, "git log -p <paths>…" shows commits that\r
+ Without this flag, "git log -p <path>…" shows commits that\r
touch the specified paths, and diffs about the same specified\r
paths. With this, the full diff is shown for commits that touch\r
- the specified paths; this means that "<paths>…" limits only\r
+ the specified paths; this means that "<path>…" limits only\r
commits, and doesn't limit diff for those commits.\r
</p>\r
</dd>\r
</p>\r
</dd>\r
<dt>\r
-<paths>…\r
+<path>…\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-28 00:02:59 UTC\r
+Last updated 2008-07-31 22:10:20 UTC\r
</div>\r
</div>\r
</body>\r
Print out the ref names of any commits that are shown.
--full-diff::
- Without this flag, "git log -p <paths>..." shows commits that
+ Without this flag, "git log -p <path>..." shows commits that
touch the specified paths, and diffs about the same specified
paths. With this, the full diff is shown for commits that touch
- the specified paths; this means that "<paths>..." limits only
+ the specified paths; this means that "<path>..." limits only
commits, and doesn't limit diff for those commits.
--follow::
Note that only message is considered, if also a diff is shown
its size is not included.
-<paths>...::
+<path>...::
Show only commits that affect any of the specified paths.
</p>\r
</dd>\r
<dt>\r
-<remote>\r
+<remote>…\r
</dt>\r
<dd>\r
<p>\r
- Other branch head merged into our branch. You need at\r
+ Other branch heads to merge into our branch. You need at\r
least one <remote>. Specifying more than one <remote>\r
obviously means you are trying an Octopus.\r
</p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-22 09:19:12 UTC\r
+Last updated 2008-07-31 22:10:20 UTC\r
</div>\r
</div>\r
</body>\r
it is created). The 'git-fmt-merge-msg' script can be used
to give a good default for automated 'git-merge' invocations.
-<remote>::
- Other branch head merged into our branch. You need at
+<remote>...::
+ Other branch heads to merge into our branch. You need at
least one <remote>. Specifying more than one <remote>
obviously means you are trying an Octopus.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
<head>\r
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.2" />\r
+<meta name="generator" content="AsciiDoc 8.2.5" />\r
<style type="text/css">\r
/* Debug borders */\r
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
margin: 1em 5% 1em 5%;\r
}\r
\r
-a { color: blue; }\r
-a:visited { color: fuchsia; }\r
+a {\r
+ color: blue;\r
+ text-decoration: underline;\r
+}\r
+a:visited {\r
+ color: fuchsia;\r
+}\r
\r
em {\r
font-style: italic;\r
line-height: 1.3;\r
}\r
\r
-h1 {\r
+h1, h2, h3 {\r
border-bottom: 2px solid silver;\r
}\r
h2 {\r
- border-bottom: 2px solid silver;\r
padding-top: 0.5em;\r
}\r
+h3 {\r
+ float: left;\r
+}\r
+h3 + * {\r
+ clear: left;\r
+}\r
\r
div.sectionbody {\r
font-family: serif;\r
color: #527bbd;\r
font-family: sans-serif;\r
font-weight: bold;\r
- font-size: 1.2em;\r
+ font-size: 1.1em;\r
}\r
span#email {\r
}\r
padding: 0.5em;\r
}\r
\r
+div.listingblock {\r
+ margin-right: 0%;\r
+}\r
div.listingblock > div.content {\r
border: 1px solid silver;\r
background: #f4f4f4;\r
div.quoteblock > div.content {\r
padding-left: 2.0em;\r
}\r
-div.quoteblock .attribution {\r
+\r
+div.attribution {\r
text-align: right;\r
}\r
+div.verseblock + div.attribution {\r
+ text-align: left;\r
+}\r
\r
div.admonitionblock .icon {\r
vertical-align: top;\r
ul, ol {\r
list-style-position: outside;\r
}\r
-ol.olist2 {\r
+div.olist2 ol {\r
list-style-type: lower-alpha;\r
}\r
\r
div.tableblock > table {\r
- border-color: #527bbd;\r
- border-width: 3px;\r
+ border: 3px solid #527bbd;\r
}\r
thead {\r
font-family: sans-serif;\r
margin-top: 0.8em;\r
margin-bottom: 0.8em;\r
}\r
+div.hlist td {\r
+ padding-bottom: 5px;\r
+}\r
td.hlist1 {\r
vertical-align: top;\r
font-style: italic;\r
@media print {\r
div#footer-badges { display: none; }\r
}\r
-include::./stylesheets/xhtml11-manpage.css[]\r
+\r
+div#toctitle {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ font-size: 1.1em;\r
+ font-weight: bold;\r
+ margin-top: 1.0em;\r
+ margin-bottom: 0.1em;\r
+}\r
+\r
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {\r
+ margin-top: 0;\r
+ margin-bottom: 0;\r
+}\r
+div.toclevel2 {\r
+ margin-left: 2em;\r
+ font-size: 0.9em;\r
+}\r
+div.toclevel3 {\r
+ margin-left: 4em;\r
+ font-size: 0.9em;\r
+}\r
+div.toclevel4 {\r
+ margin-left: 6em;\r
+ font-size: 0.9em;\r
+}\r
+include1::./stylesheets/xhtml11-manpage.css[]\r
/* Workarounds for IE6's broken and incomplete CSS2. */\r
\r
div.sidebar-content {\r
border-left: 2px solid silver;\r
padding-left: 0.5em;\r
}\r
+\r
+/* IE6 sets dynamically generated links as visited. */\r
+div#toc a:visited { color: blue; }\r
</style>\r
<title>git-send-email(1)</title>\r
</head>\r
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git send-email</em> [options] <file|directory> [… file|directory]</p>\r
+<div class="para"><p><em>git send-email</em> [options] <file|directory> [… file|directory]</p></div>\r
</div>\r
-<h2>DESCRIPTION</h2>\r
+<h2 id="_description">DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<p>Takes the patches given on the command line and emails them out.</p>\r
-<p>The header of the email is configurable by command line options. If not\r
+<div class="para"><p>Takes the patches given on the command line and emails them out.</p></div>\r
+<div class="para"><p>The header of the email is configurable by command line options. If not\r
specified on the command line, the user will be prompted with a ReadLine\r
-enabled interface to provide the necessary information.</p>\r
+enabled interface to provide the necessary information.</p></div>\r
</div>\r
-<h2>OPTIONS</h2>\r
+<h2 id="_options">OPTIONS</h2>\r
<div class="sectionbody">\r
-<p>The options available are:</p>\r
-<dl>\r
+<div class="para"><p>The options available are:</p></div>\r
+<div class="vlist"><dl>\r
<dt>\r
--bcc\r
</dt>\r
<p>\r
Specify a "Bcc:" value for each email.\r
</p>\r
-<p>The --bcc option must be repeated for each user you want on the bcc list.</p>\r
+<div class="para"><p>The --bcc option must be repeated for each user you want on the bcc list.</p></div>\r
</dd>\r
<dt>\r
--cc\r
<p>\r
Specify a starting "Cc:" value for each email.\r
</p>\r
-<p>The --cc option must be repeated for each user you want on the cc list.</p>\r
+<div class="para"><p>The --cc option must be repeated for each user you want on the cc list.</p></div>\r
</dd>\r
<dt>\r
--cc-cmd\r
<dd>\r
<p>\r
Specify the sender of the emails. This will default to\r
- the value GIT_COMMITTER_IDENT, as returned by "git-var -l".\r
+ the value GIT_COMMITTER_IDENT, as returned by "git var -l".\r
The user will still be prompted to confirm this entry.\r
</p>\r
</dd>\r
Username for SMTP-AUTH. In place of this option, the following\r
configuration variables can be specified:\r
</p>\r
-<ul>\r
+<div class="ilist"><ul>\r
<li>\r
<p>\r
sendemail.smtpuser\r
sendemail.<identity>.smtpuser (see sendemail.identity).\r
</p>\r
</li>\r
-</ul>\r
-<p>However, --smtp-user always overrides these variables.</p>\r
-<p>If a username is not specified (with --smtp-user or a\r
-configuration variable), then authentication is not attempted.</p>\r
+</ul></div>\r
+<div class="para"><p>However, --smtp-user always overrides these variables.</p></div>\r
+<div class="para"><p>If a username is not specified (with --smtp-user or a\r
+configuration variable), then authentication is not attempted.</p></div>\r
</dd>\r
<dt>\r
--smtp-pass\r
argument is specified, then the empty string is used as\r
the password.\r
</p>\r
-<p>In place of this option, the following configuration variables\r
-can be specified:</p>\r
-<ul>\r
+<div class="para"><p>In place of this option, the following configuration variables\r
+can be specified:</p></div>\r
+<div class="ilist"><ul>\r
<li>\r
<p>\r
sendemail.smtppass\r
sendemail.<identity>.smtppass (see sendemail.identity).\r
</p>\r
</li>\r
-</ul>\r
-<p>However, --smtp-pass always overrides these variables.</p>\r
-<p>Furthermore, passwords need not be specified in configuration files\r
+</ul></div>\r
+<div class="para"><p>However, --smtp-pass always overrides these variables.</p></div>\r
+<div class="para"><p>Furthermore, passwords need not be specified in configuration files\r
or on the command line. If a username has been specified (with\r
--smtp-user or a configuration variable), but no password has been\r
specified (with --smtp-pass or a configuration variable), then the\r
-user is prompted for a password while the input is masked for privacy.</p>\r
+user is prompted for a password while the input is masked for privacy.</p></div>\r
</dd>\r
<dt>\r
--smtp-encryption\r
Default is the value of the <em>sendemail.to</em> configuration value;\r
if that is unspecified, this will be prompted for.\r
</p>\r
-<p>The --to option must be repeated for each user you want on the to list.</p>\r
+<div class="para"><p>The --to option must be repeated for each user you want on the to list.</p></div>\r
</dd>\r
-</dl>\r
+</dl></div>\r
</div>\r
-<h2>CONFIGURATION</h2>\r
+<h2 id="_configuration">CONFIGURATION</h2>\r
<div class="sectionbody">\r
-<dl>\r
+<div class="vlist"><dl>\r
<dt>\r
sendemail.identity\r
</dt>\r
Legacy boolean that sets <em>smtpencryption=ssl</em> if enabled.\r
</p>\r
</dd>\r
-</dl>\r
+</dl></div>\r
</div>\r
-<h2>Author</h2>\r
+<h2 id="_author">Author</h2>\r
<div class="sectionbody">\r
-<p>Written by Ryan Anderson <ryan@michonline.com></p>\r
-<p>git-send-email is originally based upon\r
-send_lots_of_email.pl by Greg Kroah-Hartman.</p>\r
+<div class="para"><p>Written by Ryan Anderson <ryan@michonline.com></p></div>\r
+<div class="para"><p>git-send-email is originally based upon\r
+send_lots_of_email.pl by Greg Kroah-Hartman.</p></div>\r
</div>\r
-<h2>Documentation</h2>\r
+<h2 id="_documentation">Documentation</h2>\r
<div class="sectionbody">\r
-<p>Documentation by Ryan Anderson</p>\r
+<div class="para"><p>Documentation by Ryan Anderson</p></div>\r
</div>\r
-<h2>GIT</h2>\r
+<h2 id="_git">GIT</h2>\r
<div class="sectionbody">\r
-<p>Part of the <a href="git.html">git(1)</a> suite</p>\r
+<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 02-Jul-2008 03:02:01 UTC\r
+Last updated 2008-07-31 22:10:22 UTC\r
</div>\r
</div>\r
</body>\r
--from::
Specify the sender of the emails. This will default to
- the value GIT_COMMITTER_IDENT, as returned by "git-var -l".
+ the value GIT_COMMITTER_IDENT, as returned by "git var -l".
The user will still be prompted to confirm this entry.
--in-reply-to::
</p>\r
</dd>\r
<dt>\r
-<pattern>\r
+<pattern>…\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:17:03 UTC\r
+Last updated 2008-07-31 22:10:22 UTC\r
</div>\r
</div>\r
</body>\r
(5) otherwise output the line.
-<pattern>::
+<pattern>...::
Show references matching one or more patterns.
<div class="sectionbody">\r
<div class="vlist"><dl>\r
<dt>\r
-<object>\r
+<object>…\r
</dt>\r
<dd>\r
<p>\r
- The name of the object to show.\r
+ The names of objects to show.\r
For a more complete list of ways to spell object names, see\r
"SPECIFYING REVISIONS" section in <a href="git-rev-parse.html">git-rev-parse(1)</a>.\r
</p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-22 09:19:17 UTC\r
+Last updated 2008-07-31 22:10:23 UTC\r
</div>\r
</div>\r
</body>\r
OPTIONS
-------
-<object>::
- The name of the object to show.
+<object>...::
+ The names of objects to show.
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
</p>\r
</dd>\r
<dt>\r
-<path>\r
+<path>…\r
</dt>\r
<dd>\r
<p>\r
- Path to submodule(s). When specified this will restrict the command\r
+ Paths to submodule(s). When specified this will restrict the command\r
to only operate on the submodules found at the specified paths.\r
(This argument is required with add).\r
</p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-28 00:03:03 UTC\r
+Last updated 2008-07-31 22:10:24 UTC\r
</div>\r
</div>\r
</body>\r
(the default). This limit only applies to modified submodules. The
size is always limited to 1 for added/deleted/typechanged submodules.
-<path>::
- Path to submodule(s). When specified this will restrict the command
+<path>...::
+ Paths to submodule(s). When specified this will restrict the command
to only operate on the submodules found at the specified paths.
(This argument is required with add).
<div class="sectionbody">\r
<div class="vlist"><dl>\r
<dt>\r
-<tag>\r
+<tag>…\r
</dt>\r
<dd>\r
<p>\r
- SHA1 identifier of a git tag object.\r
+ SHA1 identifiers of git tag objects.\r
</p>\r
</dd>\r
</dl></div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:17:07 UTC\r
+Last updated 2008-07-31 22:10:24 UTC\r
</div>\r
</div>\r
</body>\r
OPTIONS
-------
-<tag>::
- SHA1 identifier of a git tag object.
+<tag>...::
+ SHA1 identifiers of git tag objects.
Author
------
</p>\r
</dd>\r
<dt>\r
-<path>\r
+<path>…\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:17:08 UTC\r
+Last updated 2008-07-31 22:10:25 UTC\r
</div>\r
</div>\r
</body>\r
For a more complete list of ways to spell object names, see
"SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1].
-<path>::
+<path>...::
Limit commits to the ones touching files in the given paths. Note, to
avoid ambiguity wrt. revision names use "--" to separate the paths
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User's Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id493129"></a>Git User's Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id570945">Preface</a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-with-git-fetch">Updating a repository with git-fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-comments-with-given-content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-with-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-with-git-pull">Getting updates with git-pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git-rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-with-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git-fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory -> index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -> object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -> index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -> working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git's source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. GIT Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id570945"></a>Preface</h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User's Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id240748"></a>Git User's Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id318563">Preface</a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-with-git-fetch">Updating a repository with git-fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-comments-with-given-content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-with-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-with-git-pull">Getting updates with git-pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git-rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-with-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git-fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#_pitfalls_with_submodules">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory -> index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -> object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -> index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -> working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git's source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. GIT Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id318563"></a>Preface</h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
command-line skills, but no previous knowledge of git.</p><p><a class="xref" href="#repositories-and-branches" title="Chapter 1. Repositories and Branches">Chapter 1, <i>Repositories and Branches</i></a> and <a class="xref" href="#exploring-git-history" title="Chapter 2. Exploring git history">Chapter 2, <i>Exploring git history</i></a> 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
$ git bisect bad master<br>
Bisecting: 3537 revisions left to test after this<br>
[65934a9a028b88e83e2b0f8b36618fe503349f8e] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6]</p></div><p>If you run "git branch" at this point, you'll see that git has
-temporarily moved you to a new branch named "bisect". This branch
-points to a commit (with commit id 65934…) that is reachable from
-"master" but not from v2.6.18. Compile and test it, and see whether
-it crashes. Assume it does crash. Then:</p><div class="literallayout"><p>$ git bisect bad<br>
+temporarily moved you in "(no branch)". HEAD is now detached from any
+branch and points directly to a commit (with commit id 65934…) that
+is reachable from "master" but not from v2.6.18. Compile and test it,
+and see whether it crashes. Assume it does crash. Then:</p><div class="literallayout"><p>$ git bisect bad<br>
Bisecting: 1769 revisions left to test after this<br>
[7eff82c8b1511017ae605f0c99ac275a7e21b867] i2c-core: Drop useless bitmaskings</p></div><p>checks out an older version. Continue like this, telling git at each
stage whether the version it gives you is good or bad, and notice
half each time.</p><p>After about 13 tests (in this case), it will output the commit id of
the guilty commit. You can then examine the commit with
<a class="ulink" href="git-show.html" target="_top">git-show(1)</a>, find out who wrote it, and mail them your bug
-report with the commit id. Finally, run</p><div class="literallayout"><p>$ git bisect reset</p></div><p>to return you to the branch you were on before and delete the
-temporary "bisect" branch.</p><p>Note that the version which git-bisect checks out for you at each
+report with the commit id. Finally, run</p><div class="literallayout"><p>$ git bisect reset</p></div><p>to return you to the branch you were on before.</p><p>Note that the version which git-bisect checks out for you at each
point is just a suggestion, and you're free to try a different
version if you think it would be a good idea. For example,
occasionally you may land on a commit that broke something unrelated;
run</p><div class="literallayout"><p>$ git bisect visualize</p></div><p>which will run gitk and label the commit it chose with a marker that
says "bisect". Choose a safe-looking commit nearby, note its commit
id, and check it out with:</p><div class="literallayout"><p>$ git reset --hard fb47ddb2db...</p></div><p>then test, run "bisect good" or "bisect bad" as appropriate, and
-continue.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="naming-commits"></a>Naming commits</h2></div></div></div><p>We have seen several ways of naming commits already:</p><div class="itemizedlist"><ul type="disc"><li>
+continue.</p><p>Instead of "git bisect visualize" and then "git reset —hard
+fb47ddb2db…", you might just want to tell git that you want to skip
+the current commit:</p><div class="literallayout"><p>$ git bisect skip</p></div><p>In this case, though, git may not eventually be able to tell the first
+bad one between some first skipped commits and a latter bad commit.</p><p>There are also ways to automate the bisecting process if you have a
+test script that can tell a good from a bad commit. See
+<a class="ulink" href="git-bisect.html" target="_top">git-bisect(1)</a> for more information about this and other "git
+bisect" features.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="naming-commits"></a>Naming commits</h2></div></div></div><p>We have seen several ways of naming commits already:</p><div class="itemizedlist"><ul type="disc"><li>
40-hexdigit object name
</li><li>
branch name: refers to the commit at the head of the given
-------------------------------------------------
If you run "git branch" at this point, you'll see that git has
-temporarily moved you to a new branch named "bisect". This branch
-points to a commit (with commit id 65934...) that is reachable from
-"master" but not from v2.6.18. Compile and test it, and see whether
-it crashes. Assume it does crash. Then:
+temporarily moved you in "(no branch)". HEAD is now detached from any
+branch and points directly to a commit (with commit id 65934...) that
+is reachable from "master" but not from v2.6.18. Compile and test it,
+and see whether it crashes. Assume it does crash. Then:
-------------------------------------------------
$ git bisect bad
$ git bisect reset
-------------------------------------------------
-to return you to the branch you were on before and delete the
-temporary "bisect" branch.
+to return you to the branch you were on before.
Note that the version which git-bisect checks out for you at each
point is just a suggestion, and you're free to try a different
then test, run "bisect good" or "bisect bad" as appropriate, and
continue.
+Instead of "git bisect visualize" and then "git reset --hard
+fb47ddb2db...", you might just want to tell git that you want to skip
+the current commit:
+
+-------------------------------------------------
+$ git bisect skip
+-------------------------------------------------
+
+In this case, though, git may not eventually be able to tell the first
+bad one between some first skipped commits and a latter bad commit.
+
+There are also ways to automate the bisecting process if you have a
+test script that can tell a good from a bad commit. See
+linkgit:git-bisect[1] for more information about this and other "git
+bisect" features.
+
[[naming-commits]]
Naming commits
--------------