hide existing git commands are ignored. Arguments are split by
spaces, the usual shell quoting and escaping is supported.
quote pair and a backslash can be used to quote them.
-
- If the alias expansion is prefixed with an exclamation point,
- it will be treated as a shell command. For example, defining
- "alias.new = !gitk --all --not ORIG_HEAD", the invocation
- "git new" is equivalent to running the shell command
- "gitk --all --not ORIG_HEAD".
++
+If the alias expansion is prefixed with an exclamation point,
+it will be treated as a shell command. For example, defining
+"alias.new = !gitk --all --not ORIG_HEAD", the invocation
+"git new" is equivalent to running the shell command
+"gitk --all --not ORIG_HEAD".
apply.whitespace::
Tells `git-apply` how to handle whitespaces, in the same way
commit.template::
Specify a file to use as the template for new commit messages.
+diff.autorefreshindex::
+ When using `git diff` to compare with work tree
+ files, do not consider stat-only change as changed.
+ Instead, silently run `git update-index --refresh` to
+ update the cached stat information for paths whose
+ contents in the work tree match the contents in the
+ index. This option defaults to true. Note that this
+ affects only `git diff` Porcelain, and not lower level
+ `diff` commands, such as `git diff-files`.
+
diff.renameLimit::
The number of files to consider when performing the copy/rename
detection; equivalent to the git diff option '-l'.
</li>\r
<li>\r
<p>\r
+ssh://[user@]host.xz[:port]/path/to/repo.git/\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
ssh://[user@]host.xz/path/to/repo.git/\r
</p>\r
</li>\r
<p>SSH is the default transport protocol over the network. You can\r
optionally specify which user to log-in as, and an alternate,\r
scp-like syntax is also supported. Both syntaxes support\r
-username expansion, as does the native git protocol. The following\r
+username expansion, as does the native git protocol, but\r
+only the former supports port specification. The following\r
three are identical to the last three above, respectively:</p>\r
<div class="exampleblock">\r
<div class="exampleblock-content">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Aug-2007 08:29:13 UTC\r
+Last updated 01-Sep-2007 11:16:23 UTC\r
</div>\r
</div>\r
</body>\r
spaces, the usual shell quoting and escaping is supported.\r
quote pair and a backslash can be used to quote them.\r
</p>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><tt>If the alias expansion is prefixed with an exclamation point,\r
+<p>If the alias expansion is prefixed with an exclamation point,\r
it will be treated as a shell command. For example, defining\r
"alias.new = !gitk --all --not ORIG_HEAD", the invocation\r
"git new" is equivalent to running the shell command\r
-"gitk --all --not ORIG_HEAD".</tt></pre>\r
-</div></div>\r
+"gitk --all --not ORIG_HEAD".</p>\r
</dd>\r
<dt>\r
apply.whitespace\r
</p>\r
</dd>\r
<dt>\r
+diff.autorefreshindex\r
+</dt>\r
+<dd>\r
+<p>\r
+ When using <tt>git diff</tt> to compare with work tree\r
+ files, do not consider stat-only change as changed.\r
+ Instead, silently run <tt>git update-index --refresh</tt> to\r
+ update the cached stat information for paths whose\r
+ contents in the work tree match the contents in the\r
+ index. This option defaults to true. Note that this\r
+ affects only <tt>git diff</tt> Porcelain, and not lower level\r
+ <tt>diff</tt> commands, such as <tt>git diff-files</tt>.\r
+</p>\r
+</dd>\r
+<dt>\r
diff.renameLimit\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 25-Aug-2007 03:53:06 UTC\r
+Last updated 01-Sep-2007 11:16:23 UTC\r
</div>\r
</div>\r
</body>\r
Repositories can still be accessed by hostname though, assuming\r
they correspond to these IP addresses.</p>\r
</dd>\r
-</dl>\r
-<p>To enable <tt>git-archive --remote</tt> and disable <tt>git-fetch</tt> against\r
-a repository, have the following in the configuration file in the\r
-repository (that is the file <em>config</em> next to <em>HEAD</em>, <em>refs</em> and\r
-<em>objects</em>).</p>\r
-<p>+</p>\r
+<dt>\r
+selectively enable/disable services per repository\r
+</dt>\r
+<dd>\r
+<p>\r
+ To enable <tt>git-archive --remote</tt> and disable <tt>git-fetch</tt> against\r
+ a repository, have the following in the configuration file in the\r
+ repository (that is the file <em>config</em> next to <em>HEAD</em>, <em>refs</em> and\r
+ <em>objects</em>).\r
+</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>[daemon]\r
- uploadpack = false\r
- uploadarchive = true</tt></pre>\r
+<pre><tt> [daemon]\r
+ uploadpack = false\r
+ uploadarchive = true</tt></pre>\r
</div></div>\r
+</dd>\r
+</dl>\r
</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Aug-2007 07:55:56 UTC\r
+Last updated 01-Sep-2007 11:16:24 UTC\r
</div>\r
</div>\r
</body>\r
Repositories can still be accessed by hostname though, assuming
they correspond to these IP addresses.
-
-To enable `git-archive --remote` and disable `git-fetch` against
-a repository, have the following in the configuration file in the
-repository (that is the file 'config' next to 'HEAD', 'refs' and
-'objects').
+selectively enable/disable services per repository::
+ To enable `git-archive --remote` and disable `git-fetch` against
+ a repository, have the following in the configuration file in the
+ repository (that is the file 'config' next to 'HEAD', 'refs' and
+ 'objects').
+
----------------------------------------------------------------
-[daemon]
- uploadpack = false
- uploadarchive = true
+ [daemon]
+ uploadpack = false
+ uploadarchive = true
----------------------------------------------------------------
</li>\r
<li>\r
<p>\r
+ssh://[user@]host.xz[:port]/path/to/repo.git/\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
ssh://[user@]host.xz/path/to/repo.git/\r
</p>\r
</li>\r
<p>SSH is the default transport protocol over the network. You can\r
optionally specify which user to log-in as, and an alternate,\r
scp-like syntax is also supported. Both syntaxes support\r
-username expansion, as does the native git protocol. The following\r
+username expansion, as does the native git protocol, but\r
+only the former supports port specification. The following\r
three are identical to the last three above, respectively:</p>\r
<div class="exampleblock">\r
<div class="exampleblock-content">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Aug-2007 08:29:13 UTC\r
+Last updated 01-Sep-2007 11:16:25 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<p>Lets you rewrite git revision history by creating a new branch from\r
-your current branch, applying custom filters on each revision.\r
+<p>Lets you rewrite git revision history by rewriting the branches mentioned\r
+in the <rev-list options>, applying custom filters on each revision.\r
Those filters can modify each tree (e.g. removing a file or running\r
a perl rewrite on all files) or information about each commit.\r
Otherwise, all information (including original commit times or merge\r
information) will be preserved.</p>\r
-<p>The command takes the new branch name as a mandatory argument and\r
-the filters as optional arguments. If you specify no filters, the\r
-commits will be recommitted without any changes, which would normally\r
-have no effect. Nevertheless, this may be useful in the future for\r
-compensating for some git bugs or such, therefore such a usage is\r
-permitted.</p>\r
+<p>The command will only rewrite the _positive_ refs mentioned in the\r
+command line (i.e. if you pass <em>a..b</em>, only <em>b</em> will be rewritten).\r
+If you specify no filters, the commits will be recommitted without any\r
+changes, which would normally have no effect. Nevertheless, this may be\r
+useful in the future for compensating for some git bugs or such,\r
+therefore such a usage is permitted.</p>\r
<p><strong>WARNING</strong>! The rewritten history will have different object names for all\r
the objects and will not converge with the original branch. You will not\r
be able to easily push and distribute the rewritten branch on top of the\r
if different from the rewritten ones, will be stored in the namespace\r
<em>refs/original/</em>.</p>\r
<p>Note that since this operation is extensively I/O expensive, it might\r
-be a good idea to redirect the temporary directory off-disk, e.g. on\r
-tmpfs. Reportedly the speedup is very noticeable.</p>\r
+be a good idea to redirect the temporary directory off-disk with the\r
+<em>-d</em> option, e.g. on tmpfs. Reportedly the speedup is very noticeable.</p>\r
<h3>Filters</h3>\r
<p>The filters are applied in the order as listed below. The <command>\r
argument is always evaluated in shell using the <em>eval</em> command (with the\r
<p>As a special extension, the commit filter may emit multiple\r
commit ids; in that case, ancestors of the original commit will\r
have all of them as parents.</p>\r
+<p>You can use the <em>map</em> convenience function in this filter, and other\r
+convenience functions, too. For example, calling <em>skip_commit "$@"</em>\r
+will leave out the current commit (but not its changes! If you want\r
+that, use <a href="git-rebase.html">git-rebase(1)</a> instead).</p>\r
</dd>\r
<dt>\r
--tag-name-filter <command>\r
<div class="content">\r
<pre><tt>git filter-branch --parent-filter 'sed "s/^\$/-p <graft-id>/"' HEAD</tt></pre>\r
</div></div>\r
-<p>(if the parent string is empty - therefore we are dealing with the\r
-initial commit - add graftcommit as a parent). Note that this assumes\r
+<p>(if the parent string is empty - which happens when we are dealing with\r
+the initial commit - add graftcommit as a parent). Note that this assumes\r
history with a single root (that is, no merge without common ancestors\r
happened). If this is not the case, use:</p>\r
<div class="listingblock">\r
<pre><tt>git filter-branch --commit-filter '\r
if [ "$GIT_AUTHOR_NAME" = "Darl McBribe" ];\r
then\r
- shift;\r
- while [ -n "$1" ];\r
- do\r
- shift;\r
- echo "$1";\r
- shift;\r
- done;\r
+ skip_commit "$@";\r
else\r
git commit-tree "$@";\r
fi' HEAD</tt></pre>\r
</div></div>\r
+<p>Note that the changes introduced by the commits, and not reverted by\r
+subsequent commits, will still be in the rewritten branch. If you want\r
+to throw out _changes_ together with the commits, you should use the\r
+interactive mode of <a href="git-rebase.html">git-rebase(1)</a>.</p>\r
+<p>The function <em>skip_commits</em> is defined as follows:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>skip_commit()\r
+{\r
+ shift;\r
+ while [ -n "$1" ];\r
+ do\r
+ shift;\r
+ map "$1";\r
+ shift;\r
+ done;\r
+}</tt></pre>\r
+</div></div>\r
<p>The shift magic first throws away the tree id and then the -p\r
parameters. Note that this handles merges properly! In case Darl\r
committed a merge between P1 and P2, it will be propagated properly\r
range in addition to the new branch name. The new branch name will\r
point to the top-most revision that a <em>git rev-list</em> of this range\r
will print.</p>\r
-<p>Note that the changes introduced by the commits, and not reverted by\r
-subsequent commits, will still be in the rewritten branch. If you want\r
+<p><strong>NOTE</strong> the changes introduced by the commits, and which are not reverted\r
+by subsequent commits, will still be in the rewritten branch. If you want\r
to throw out _changes_ together with the commits, you should use the\r
interactive mode of <a href="git-rebase.html">git-rebase(1)</a>.</p>\r
<p>Consider this history:</p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Aug-2007 07:55:56 UTC\r
+Last updated 01-Sep-2007 11:16:25 UTC\r
</div>\r
</div>\r
</body>\r
DESCRIPTION
-----------
-Lets you rewrite git revision history by creating a new branch from
-your current branch, applying custom filters on each revision.
+Lets you rewrite git revision history by rewriting the branches mentioned
+in the <rev-list options>, applying custom filters on each revision.
Those filters can modify each tree (e.g. removing a file or running
a perl rewrite on all files) or information about each commit.
Otherwise, all information (including original commit times or merge
information) will be preserved.
-The command takes the new branch name as a mandatory argument and
-the filters as optional arguments. If you specify no filters, the
-commits will be recommitted without any changes, which would normally
-have no effect. Nevertheless, this may be useful in the future for
-compensating for some git bugs or such, therefore such a usage is
-permitted.
+The command will only rewrite the _positive_ refs mentioned in the
+command line (i.e. if you pass 'a..b', only 'b' will be rewritten).
+If you specify no filters, the commits will be recommitted without any
+changes, which would normally have no effect. Nevertheless, this may be
+useful in the future for compensating for some git bugs or such,
+therefore such a usage is permitted.
*WARNING*! The rewritten history will have different object names for all
the objects and will not converge with the original branch. You will not
'refs/original/'.
Note that since this operation is extensively I/O expensive, it might
-be a good idea to redirect the temporary directory off-disk, e.g. on
-tmpfs. Reportedly the speedup is very noticeable.
+be a good idea to redirect the temporary directory off-disk with the
+'-d' option, e.g. on tmpfs. Reportedly the speedup is very noticeable.
Filters
As a special extension, the commit filter may emit multiple
commit ids; in that case, ancestors of the original commit will
have all of them as parents.
++
+You can use the 'map' convenience function in this filter, and other
+convenience functions, too. For example, calling 'skip_commit "$@"'
+will leave out the current commit (but not its changes! If you want
+that, use gitlink:git-rebase[1] instead).
--tag-name-filter <command>::
This is the filter for rewriting tag names. When passed,
git filter-branch --parent-filter 'sed "s/^\$/-p <graft-id>/"' HEAD
-------------------------------------------------------------------
-(if the parent string is empty - therefore we are dealing with the
-initial commit - add graftcommit as a parent). Note that this assumes
+(if the parent string is empty - which happens when we are dealing with
+the initial commit - add graftcommit as a parent). Note that this assumes
history with a single root (that is, no merge without common ancestors
happened). If this is not the case, use:
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "Darl McBribe" ];
then
- shift;
- while [ -n "$1" ];
- do
- shift;
- echo "$1";
- shift;
- done;
+ skip_commit "$@";
else
git commit-tree "$@";
fi' HEAD
------------------------------------------------------------------------------
+Note that the changes introduced by the commits, and not reverted by
+subsequent commits, will still be in the rewritten branch. If you want
+to throw out _changes_ together with the commits, you should use the
+interactive mode of gitlink:git-rebase[1].
+
+The function 'skip_commits' is defined as follows:
+
+--------------------------
+skip_commit()
+{
+ shift;
+ while [ -n "$1" ];
+ do
+ shift;
+ map "$1";
+ shift;
+ done;
+}
+--------------------------
+
The shift magic first throws away the tree id and then the -p
parameters. Note that this handles merges properly! In case Darl
committed a merge between P1 and P2, it will be propagated properly
and all children of the merge will become merge commits with P1,P2
as their parents instead of the merge commit.
+
To restrict rewriting to only part of the history, specify a revision
range in addition to the new branch name. The new branch name will
point to the top-most revision that a 'git rev-list' of this range
will print.
-Note that the changes introduced by the commits, and not reverted by
-subsequent commits, will still be in the rewritten branch. If you want
+*NOTE* the changes introduced by the commits, and which are not reverted
+by subsequent commits, will still be in the rewritten branch. If you want
to throw out _changes_ together with the commits, you should use the
interactive mode of gitlink:git-rebase[1].
+
Consider this history:
------------------
</li>\r
<li>\r
<p>\r
+ssh://[user@]host.xz[:port]/path/to/repo.git/\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
ssh://[user@]host.xz/path/to/repo.git/\r
</p>\r
</li>\r
<p>SSH is the default transport protocol over the network. You can\r
optionally specify which user to log-in as, and an alternate,\r
scp-like syntax is also supported. Both syntaxes support\r
-username expansion, as does the native git protocol. The following\r
+username expansion, as does the native git protocol, but\r
+only the former supports port specification. The following\r
three are identical to the last three above, respectively:</p>\r
<div class="exampleblock">\r
<div class="exampleblock-content">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Aug-2007 08:29:14 UTC\r
+Last updated 01-Sep-2007 11:16:25 UTC\r
</div>\r
</div>\r
</body>\r
</li>\r
<li>\r
<p>\r
+ssh://[user@]host.xz[:port]/path/to/repo.git/\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
ssh://[user@]host.xz/path/to/repo.git/\r
</p>\r
</li>\r
<p>SSH is the default transport protocol over the network. You can\r
optionally specify which user to log-in as, and an alternate,\r
scp-like syntax is also supported. Both syntaxes support\r
-username expansion, as does the native git protocol. The following\r
+username expansion, as does the native git protocol, but\r
+only the former supports port specification. The following\r
three are identical to the last three above, respectively:</p>\r
<div class="exampleblock">\r
<div class="exampleblock-content">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Aug-2007 08:29:14 UTC\r
+Last updated 01-Sep-2007 11:16:26 UTC\r
</div>\r
</div>\r
</body>\r
<dd>\r
<p>\r
Make a list of the commits which are about to be rebased. Let the\r
- user edit that list before rebasing.\r
+ user edit that list before rebasing. This mode can also be used to\r
+ split commits (see SPLITTING COMMITS below).\r
</p>\r
</dd>\r
<dt>\r
<pre><tt>$ git rebase -i -p --onto Q O</tt></pre>\r
</div></div>\r
</div>\r
+<h2>SPLITTING COMMITS</h2>\r
+<div class="sectionbody">\r
+<p>In interactive mode, you can mark commits with the action "edit". However,\r
+this does not necessarily mean that <em>git rebase</em> expects the result of this\r
+edit to be exactly one commit. Indeed, you can undo the commit, or you can\r
+add other commits. This can be used to split a commit into two:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+Start an interactive rebase with <em>git rebase -i <commit>^</em>, where\r
+ <commit> is the commit you want to split. In fact, any commit range\r
+ will do, as long as it contains that commit.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Mark the commit you want to split with the action "edit".\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+When it comes to editing that commit, execute <em>git reset HEAD^</em>. The\r
+ effect is that the HEAD is rewound by one, and the index follows suit.\r
+ However, the working tree stays the same.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Now add the changes to the index that you want to have in the first\r
+ commit. You can use <a href="git-add.html">git-add(1)</a> (possibly interactively) and/or\r
+ <a href="git-gui.html">git-gui(1)</a> to do that.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Commit the now-current index with whatever commit message is appropriate\r
+ now.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Repeat the last two steps until your working tree is clean.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Continue the rebase with <em>git rebase --continue</em>.\r
+</p>\r
+</li>\r
+</ul>\r
+<p>If you are not absolutely sure that the intermediate revisions are\r
+consistent (they compile, pass the testsuite, etc.) you should use\r
+<a href="git-stash.html">git-stash(1)</a> to stash away the not-yet-committed changes\r
+after each commit, test, and amend the commit if fixes are necessary.</p>\r
+</div>\r
<h2>Authors</h2>\r
<div class="sectionbody">\r
<p>Written by Junio C Hamano <junkio@cox.net> and\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 17-Aug-2007 07:47:32 UTC\r
+Last updated 01-Sep-2007 11:16:26 UTC\r
</div>\r
</div>\r
</body>\r
-i, \--interactive::
Make a list of the commits which are about to be rebased. Let the
- user edit that list before rebasing.
+ user edit that list before rebasing. This mode can also be used to
+ split commits (see SPLITTING COMMITS below).
-p, \--preserve-merges::
Instead of ignoring merges, try to recreate them. This option
$ git rebase -i -p --onto Q O
-----------------------------
+
+SPLITTING COMMITS
+-----------------
+
+In interactive mode, you can mark commits with the action "edit". However,
+this does not necessarily mean that 'git rebase' expects the result of this
+edit to be exactly one commit. Indeed, you can undo the commit, or you can
+add other commits. This can be used to split a commit into two:
+
+- Start an interactive rebase with 'git rebase -i <commit>^', where
+ <commit> is the commit you want to split. In fact, any commit range
+ will do, as long as it contains that commit.
+
+- Mark the commit you want to split with the action "edit".
+
+- When it comes to editing that commit, execute 'git reset HEAD^'. The
+ effect is that the HEAD is rewound by one, and the index follows suit.
+ However, the working tree stays the same.
+
+- Now add the changes to the index that you want to have in the first
+ commit. You can use gitlink:git-add[1] (possibly interactively) and/or
+ gitlink:git-gui[1] to do that.
+
+- Commit the now-current index with whatever commit message is appropriate
+ now.
+
+- Repeat the last two steps until your working tree is clean.
+
+- Continue the rebase with 'git rebase --continue'.
+
+If you are not absolutely sure that the intermediate revisions are
+consistent (they compile, pass the testsuite, etc.) you should use
+gitlink:git-stash[1] to stash away the not-yet-committed changes
+after each commit, test, and amend the commit if fixes are necessary.
+
+
Authors
------
Written by Junio C Hamano <junkio@cox.net> and
</li>\r
<li>\r
<p>\r
-The current git nurse is Junio C Hamano <junkio@cox.net>.\r
+The current git nurse is Junio C Hamano <gitster@pobox.com>.\r
</p>\r
</li>\r
<li>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 28-Aug-2007 06:25:11 UTC\r
+Last updated 01-Sep-2007 11:16:26 UTC\r
</div>\r
</div>\r
</body>\r
Authors
-------
* git's founding father is Linus Torvalds <torvalds@osdl.org>.
-* The current git nurse is Junio C Hamano <junkio@cox.net>.
+* The current git nurse is Junio C Hamano <gitster@pobox.com>.
* The git potty was written by Andres Ericsson <ae@op5.se>.
* General upbringing is handled by the git-list <git@vger.kernel.org>.
- https://host.xz/path/to/repo.git/
- git://host.xz/path/to/repo.git/
- git://host.xz/~user/path/to/repo.git/
+- ssh://{startsb}user@{endsb}host.xz{startsb}:port{endsb}/path/to/repo.git/
- ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/
- ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/
- ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git
SSH is the default transport protocol over the network. You can
optionally specify which user to log-in as, and an alternate,
scp-like syntax is also supported. Both syntaxes support
-username expansion, as does the native git protocol. The following
+username expansion, as does the native git protocol, but
+only the former supports port specification. The following
three are identical to the last three above, respectively:
===============================================================