.\" 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\-CLONE" "1" "08/11/2007" "Git 1.5.3.rc4.67.gf9286" "Git Manual"
+.TH "GIT\-CLONE" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
git://host.xz/~user/path/to/repo.git/
.TP
\(bu
+ssh://[user@]host.xz[:port]/path/to/repo.git/
+.TP
+\(bu
ssh://[user@]host.xz/path/to/repo.git/
.TP
\(bu
\(bu
ssh://[user@]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 three are identical to the last three above, respectively:
+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, but only the former supports port specification. The following three are identical to the last three above, respectively:
.IP
.TP 3
\(bu
.\" 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\-CONFIG" "1" "08/25/2007" "Git 1.5.3.rc6.23.g0058" "Git Manual"
+.TH "GIT\-CONFIG" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.TP
alias.*
Command aliases for the \fBgit\fR(1) command wrapper \- e.g. after defining "alias.last = cat\-file commit HEAD", the invocation "git last" is equivalent to "git cat\-file commit HEAD". To avoid confusion and troubles with script usage, aliases that 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.
-.sp
-.nf
-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".
-.fi
+
+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".
.TP
apply.whitespace
Tells git\-apply how to handle whitespaces, in the same way as the \fI\-\-whitespace\fR option. See \fBgit\-apply\fR(1).
commit.template
Specify a file to use as the template for new commit messages.
.TP
+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.
+.TP
diff.renameLimit
The number of files to consider when performing the copy/rename detection; equivalent to the git diff option \fI\-l\fR.
.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\-DAEMON" "1" "08/31/2007" "Git 1.5.3.rc7.16.ge340d" "Git Manual"
+.TH "GIT\-DAEMON" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.fi
In this example, the root\-level directory /pub will contain a subdirectory for each virtual host IP address supported. Repositories can still be accessed by hostname though, assuming they correspond to these IP addresses.
-
+.TP
+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 \fIconfig\fR next to \fIHEAD\fR, \fIrefs\fR and \fIobjects\fR).
-
-+
.sp
.nf
.ft C
-[daemon]
- uploadpack = false
- uploadarchive = true
+ [daemon]
+ uploadpack = false
+ uploadarchive = true
.ft
.fi
.\" 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\-FETCH" "1" "08/11/2007" "Git 1.5.3.rc4.67.gf9286" "Git Manual"
+.TH "GIT\-FETCH" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
git://host.xz/~user/path/to/repo.git/
.TP
\(bu
+ssh://[user@]host.xz[:port]/path/to/repo.git/
+.TP
+\(bu
ssh://[user@]host.xz/path/to/repo.git/
.TP
\(bu
\(bu
ssh://[user@]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 three are identical to the last three above, respectively:
+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, but only the former supports port specification. The following three are identical to the last three above, respectively:
.IP
.TP 3
\(bu
.\" 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\-FILTER\-BRANCH" "1" "08/31/2007" "Git 1.5.3.rc7.16.ge340d" "Git Manual"
+.TH "GIT\-FILTER\-BRANCH" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
[<rev\-list options>\&...]
.fi
.SH "DESCRIPTION"
-Lets you rewrite git revision history by creating a new branch from your current branch, 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.
+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 \fIa..b\fR, only \fIb\fR 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.
\fBWARNING\fR! The rewritten history will have different object names for all the objects and will not converge with the original branch. You will not be able to easily push and distribute the rewritten branch on top of the original branch. Please do not use this command if you do not know the full implications, and avoid using it anyway, if a simple single commit would suffice to fix your problem.
Always verify that the rewritten version is correct: The original refs, if different from the rewritten ones, will be stored in the namespace \fIrefs/original/\fR.
-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.
+Note that since this operation is extensively I/O expensive, it might be a good idea to redirect the temporary directory off\-disk with the \fI\-d\fR option, e.g. on tmpfs. Reportedly the speedup is very noticeable.
.SS "Filters"
The filters are applied in the order as listed below. The <command> argument is always evaluated in shell using the \fIeval\fR command (with the notable exception of the commit filter, for technical reasons). Prior to that, the $GIT_COMMIT environment variable will be set to contain the id of the commit being rewritten. Also, GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, and GIT_COMMITTER_DATE are set according to the current commit.
This is the filter for performing the commit. If this filter is specified, it will be called instead of the \fBgit\-commit\-tree\fR(1) command, with arguments of the form "<TREE_ID> [\-p <PARENT_COMMIT_ID>]\&..." and the log message on stdin. The commit id is expected on stdout.
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 \fImap\fR convenience function in this filter, and other convenience functions, too. For example, calling \fIskip_commit "$@"\fR will leave out the current commit (but not its changes! If you want that, use \fBgit\-rebase\fR(1) instead).
.TP
\-\-tag\-name\-filter <command>
This is the filter for rewriting tag names. When passed, it will be called for every tag ref that points to a rewritten object (or to a tag object which points to a rewritten object). The original tag name is passed via standard input, and the new tag name is expected on standard output.
.ft
.fi
-(if the parent string is empty \- therefore 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:
+(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:
.sp
.nf
.ft C
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
.ft
+.fi
+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 \fBgit\-rebase\fR(1).
+
+The function \fIskip_commits\fR is defined as follows:
+.sp
+.nf
+.ft C
+skip_commit()
+{
+ shift;
+ while [ \-n "$1" ];
+ do
+ shift;
+ map "$1";
+ shift;
+ done;
+}
+.ft
+
.fi
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 \fIgit rev\-list\fR 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 to throw out _changes_ together with the commits, you should use the interactive mode of \fBgit\-rebase\fR(1).
+\fBNOTE\fR 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 \fBgit\-rebase\fR(1).
Consider this history:
.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\-PULL" "1" "08/11/2007" "Git 1.5.3.rc4.67.gf9286" "Git Manual"
+.TH "GIT\-PULL" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
git://host.xz/~user/path/to/repo.git/
.TP
\(bu
+ssh://[user@]host.xz[:port]/path/to/repo.git/
+.TP
+\(bu
ssh://[user@]host.xz/path/to/repo.git/
.TP
\(bu
\(bu
ssh://[user@]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 three are identical to the last three above, respectively:
+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, but only the former supports port specification. The following three are identical to the last three above, respectively:
.IP
.TP 3
\(bu
.\" 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\-PUSH" "1" "08/11/2007" "Git 1.5.3.rc4.67.gf9286" "Git Manual"
+.TH "GIT\-PUSH" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
git://host.xz/~user/path/to/repo.git/
.TP
\(bu
+ssh://[user@]host.xz[:port]/path/to/repo.git/
+.TP
+\(bu
ssh://[user@]host.xz/path/to/repo.git/
.TP
\(bu
\(bu
ssh://[user@]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 three are identical to the last three above, respectively:
+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, but only the former supports port specification. The following three are identical to the last three above, respectively:
.IP
.TP 3
\(bu
.\" 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\-REBASE" "1" "08/17/2007" "Git 1.5.3.rc5.15.ga9ab2" "Git Manual"
+.TH "GIT\-REBASE" "1" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
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
\-i, \-\-interactive
-Make a list of the commits which are about to be rebased. Let the user edit that list before rebasing.
+Make a list of the commits which are about to be rebased. Let the user edit that list before rebasing. This mode can also be used to split commits (see SPLITTING COMMITS below).
.TP
\-p, \-\-preserve\-merges
Instead of ignoring merges, try to recreate them. This option only works in interactive mode.
.ft
.fi
+.SH "SPLITTING COMMITS"
+In interactive mode, you can mark commits with the action "edit". However, this does not necessarily mean that \fIgit rebase\fR 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:
+.TP 3
+\(bu
+Start an interactive rebase with \fIgit rebase \-i <commit>^\fR, where <commit> is the commit you want to split. In fact, any commit range will do, as long as it contains that commit.
+.TP
+\(bu
+Mark the commit you want to split with the action "edit".
+.TP
+\(bu
+When it comes to editing that commit, execute \fIgit reset HEAD^\fR. The effect is that the HEAD is rewound by one, and the index follows suit. However, the working tree stays the same.
+.TP
+\(bu
+Now add the changes to the index that you want to have in the first commit. You can use \fBgit\-add\fR(1) (possibly interactively) and/or \fBgit\-gui\fR(1) to do that.
+.TP
+\(bu
+Commit the now\-current index with whatever commit message is appropriate now.
+.TP
+\(bu
+Repeat the last two steps until your working tree is clean.
+.TP
+\(bu
+Continue the rebase with \fIgit rebase \-\-continue\fR.
+
+If you are not absolutely sure that the intermediate revisions are consistent (they compile, pass the testsuite, etc.) you should use \fBgit\-stash\fR(1) to stash away the not\-yet\-committed changes after each commit, test, and amend the commit if fixes are necessary.
.SH "AUTHORS"
Written by Junio C Hamano <junkio@cox.net> and Johannes E. Schindelin <johannes.schindelin@gmx.de>
.SH "DOCUMENTATION"
.\" 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" "7" "08/28/2007" "Git 1.5.3.rc6.54.g9277" "Git Manual"
+.TH "GIT" "7" "09/01/2007" "Git 1.5.3.rc7.30.g947ad2" "Git Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
git's founding father is Linus Torvalds <torvalds@osdl.org>.
.TP
\(bu
-The current git nurse is Junio C Hamano <junkio@cox.net>.
+The current git nurse is Junio C Hamano <gitster@pobox.com>.
.TP
\(bu
The git potty was written by Andres Ericsson <ae@op5.se>.