diff options
author | Junio C Hamano <junkio@cox.net> | 2005-12-03 23:46:02 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-03 23:46:02 -0800 |
commit | 423325a2d24638ddcc82ce47be5e40be550f4507 (patch) | |
tree | 00960b001d786299d3da04a4467bd0c798bf8cda /Documentation | |
parent | 93dcab2937624ebb97f91807576cddb242a55a46 (diff) | |
parent | d79374c7b58d3814ffdc277de608243f8e665e3a (diff) | |
download | git-423325a2d24638ddcc82ce47be5e40be550f4507.tar.gz |
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/fetch-options.txt | 5 | ||||
-rw-r--r-- | Documentation/git-bisect.txt | 14 | ||||
-rw-r--r-- | Documentation/git-cat-file.txt | 13 | ||||
-rw-r--r-- | Documentation/git-diff-files.txt | 9 | ||||
-rw-r--r-- | Documentation/git-mailinfo.txt | 11 | ||||
-rw-r--r-- | Documentation/git-merge.txt | 97 | ||||
-rw-r--r-- | Documentation/git-mv.txt | 8 | ||||
-rw-r--r-- | Documentation/git-read-tree.txt | 10 | ||||
-rw-r--r-- | Documentation/git-svnimport.txt | 13 | ||||
-rw-r--r-- | Documentation/git-tag.txt | 22 | ||||
-rw-r--r-- | Documentation/pull-fetch-param.txt | 14 | ||||
-rw-r--r-- | Documentation/tutorial.txt | 15 |
12 files changed, 187 insertions, 44 deletions
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index a25d04a4fa..200c9b240d 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -4,6 +4,11 @@ option old data in `.git/FETCH_HEAD` will be overwritten. -f, \--force:: + When `git-fetch` is used with `<rbranch>:<lbranch>` + refspec, it refuses to update the local branch + `<lbranch>` unless the remote branch `<rbranch>` it + fetches is a descendant of `<lbranch>`. This option + overrides that check. -t, \--tags:: By default, the git core utilities will not fetch and store diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt index 39fa665d9d..8a399703dc 100644 --- a/Documentation/git-bisect.txt +++ b/Documentation/git-bisect.txt @@ -8,13 +8,13 @@ git-bisect - Find the change that introduced a bug SYNOPSIS -------- -'git bisect' start -'git bisect' bad <rev> -'git bisect' good <rev> -'git bisect' reset [<branch>] -'git bisect' visualize -'git bisect' replay <logfile> -'git bisect' log + 'git bisect' start + 'git bisect' bad <rev> + 'git bisect' good <rev> + 'git bisect' reset [<branch>] + 'git bisect' visualize + 'git bisect' replay <logfile> + 'git bisect' log DESCRIPTION ----------- diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index ab4dcae21c..9a7700fa7f 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -8,7 +8,7 @@ git-cat-file - Provide content or type information for repository objects SYNOPSIS -------- -'git-cat-file' (-t | -s | <type>) <object> +'git-cat-file' (-t | -s | -e | <type>) <object> DESCRIPTION ----------- @@ -29,6 +29,10 @@ OPTIONS Instead of the content, show the object size identified by <object>. +-e:: + Suppress all output; instead exit with zero status if <object> + exists and is a valid object. + <type>:: Typically this matches the real type of <object> but asking for a type that can trivially be dereferenced from the given @@ -39,8 +43,11 @@ OPTIONS OUTPUT ------ -If '-t' is specified, one of the <type>. If '-s' is specified, -the size of the <object> in bytes. +If '-t' is specified, one of the <type>. + +If '-s' is specified, the size of the <object> in bytes. + +If '-e' is specified, no output. Otherwise the raw (though uncompressed) contents of the <object> will be returned. diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt index 3b04bfeec6..67f51265e6 100644 --- a/Documentation/git-diff-files.txt +++ b/Documentation/git-diff-files.txt @@ -21,6 +21,15 @@ OPTIONS ------- include::diff-options.txt[] +-1 -2 -3 or --base --ours --theirs, and -0:: + Diff against the "base" version, "our branch" or "their + branch" respectively. With these options, diffs for + merged entries are not shown. ++ +The default is to diff against our branch (-2) and the +cleanly resolved paths. The option -0 can be given to +omit diff output for unmerged entries and just show "Unmerged". + -q:: Remain silent even on nonexisting files diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index dc7d725ea1..8890754740 100644 --- a/Documentation/git-mailinfo.txt +++ b/Documentation/git-mailinfo.txt @@ -8,7 +8,7 @@ git-mailinfo - Extracts patch from a single e-mail message. SYNOPSIS -------- -'git-mailinfo' [-k] [-u] <msg> <patch> +'git-mailinfo' [-k] [-u | --encoding=<encoding>] <msg> <patch> DESCRIPTION @@ -37,10 +37,17 @@ OPTIONS author email are taken from the e-mail without any charset conversion, after minimally decoding MIME transfer encoding. This flag causes the resulting - commit to be encoded in utf-8 by transliterating them. + commit to be encoded in the encoding specified by + i18n.commitencoding configuration (defaults to utf-8) by + transliterating them. Note that the patch is always used as is without charset conversion, even with this flag. +--encoding=<encoding>:: + Similar to -u but if the local convention is different + from what is specified by i18n.commitencoding, this flag + can be used to override it. + <msg>:: The commit log message extracted from e-mail, usually except the title line which comes from e-mail Subject. diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 904e2fc4c5..0cac563d40 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -37,6 +37,103 @@ include::merge-options.txt[] include::merge-strategies.txt[] +HOW MERGE WORKS +--------------- + +A merge is always between the current `HEAD` and one or more +remote branch heads, and the index file must exactly match the +tree of `HEAD` commit (i.e. the contents of the last commit) when +it happens. In other words, `git-diff --cached HEAD` must +report no changes. + +[NOTE] +This is a bit of lie. In certain special cases, your index are +allowed to be different from the tree of `HEAD` commit. The most +notable case is when your `HEAD` commit is already ahead of what +is being merged, in which case your index can have arbitrary +difference from your `HEAD` commit. Otherwise, your index entries +are allowed have differences from your `HEAD` commit that match +the result of trivial merge (e.g. you received the same patch +from external source to produce the same result as what you are +merging). For example, if a path did not exist in the common +ancestor and your head commit but exists in the tree you are +merging into your repository, and if you already happen to have +that path exactly in your index, the merge does not have to +fail. + +Otherwise, merge will refuse to do any harm to your repository +(that is, it may fetch the objects from remote, and it may even +update the local branch used to keep track of the remote branch +with `git pull remote rbranch:lbranch`, but your working tree, +`.git/HEAD` pointer and index file are left intact). + +You may have local modifications in the working tree files. In +other words, `git-diff` is allowed to report changes. +However, the merge uses your working tree as the working area, +and in order to prevent the merge operation from losing such +changes, it makes sure that they do not interfere with the +merge. Those complex tables in read-tree documentation define +what it means for a path to "interfere with the merge". And if +your local modifications interfere with the merge, again, it +stops before touching anything. + +So in the above two "failed merge" case, you do not have to +worry about lossage of data --- you simply were not ready to do +a merge, so no merge happened at all. You may want to finish +whatever you were in the middle of doing, and retry the same +pull after you are done and ready. + +When things cleanly merge, these things happen: + +1. the results are updated both in the index file and in your + working tree, +2. index file is written out as a tree, +3. the tree gets committed, and +4. the `HEAD` pointer gets advanced. + +Because of 2., we require that the original state of the index +file to match exactly the current `HEAD` commit; otherwise we +will write out your local changes already registered in your +index file along with the merge result, which is not good. +Because 1. involves only the paths different between your +branch and the remote branch you are pulling from during the +merge (which is typically a fraction of the whole tree), you can +have local modifications in your working tree as long as they do +not overlap with what the merge updates. + +When there are conflicts, these things happen: + +1. `HEAD` stays the same. + +2. Cleanly merged paths are updated both in the index file and + in your working tree. + +3. For conflicting paths, the index file records up to three + versions; stage1 stores the version from the common ancestor, + stage2 from `HEAD`, and stage3 from the remote branch (you + can inspect the stages with `git-ls-files -u`). The working + tree files have the result of "merge" program; i.e. 3-way + merge result with familiar conflict markers `<<< === >>>`. + +4. No other changes are done. In particular, the local + modifications you had before you started merge will stay the + same and the index entries for them stay as they were, + i.e. matching `HEAD`. + +After seeing a conflict, you can do two things: + + * Decide not to merge. The only clean-up you need are to reset + the index file to the `HEAD` commit to reverse 2. and to clean + up working tree changes made by 2. and 3.; `git-reset` can + be used for this. + + * Resolve the conflicts. `git-diff` would report only the + conflicting paths because of the above 2. and 3.. Edit the + working tree files into a desirable shape, `git-update-index` + them, to make the index file contain what the merge result + should be, and run `git-commit` to commit the result. + + SEE ALSO -------- gitlink:git-fmt-merge-msg[1], gitlink:git-pull[1] diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt index f2d5882f48..3013b8d0c2 100644 --- a/Documentation/git-mv.txt +++ b/Documentation/git-mv.txt @@ -8,14 +8,14 @@ git-mv - Script used to move or rename a file, directory or symlink. SYNOPSIS -------- -'git-mv' [-f] [-n] <source> <destination> -'git-mv' [-f] [-k] [-n] <source> ... <destination directory> + 'git-mv' [-f] [-n] <source> <destination> + 'git-mv' [-f] [-n] [-k] <source> ... <destination directory> DESCRIPTION ----------- This script is used to move or rename a file, directory or symlink. In the first form, it renames <source>, which must exist and be either -a file, symlink or directory, to <destination>, which must not exist. +a file, symlink or directory, to <destination>. In the second form, the last argument has to be an existing directory; the given sources will be moved into this directory. @@ -25,7 +25,7 @@ committed. OPTIONS ------- -f:: - Force renaming or moving even targets exist + Force renaming or moving of a file even if the target exists -k:: Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index 8b91847856..6e92e4aa66 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -28,11 +28,14 @@ will be in unmerged state when "git-read-tree" returns. OPTIONS ------- -m:: - Perform a merge, not just a read. + Perform a merge, not just a read. The command will + refuse to run if your index file has unmerged entries, + indicating that you have not finished previous merge you + started. --reset:: - - Same as -m except that unmerged entries will be silently ignored. + Same as -m, except that unmerged entries are discarded + instead of failing. -u:: After a successful merge, update the files in the work @@ -47,7 +50,6 @@ OPTIONS trees that are not directly related to the current working tree status into a temporary index file. - <tree-ish#>:: The id of the tree object(s) to be read/merged. diff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt index fcc79fa93a..f8dbee7096 100644 --- a/Documentation/git-svnimport.txt +++ b/Documentation/git-svnimport.txt @@ -10,7 +10,7 @@ git-svnimport - Import a SVN repository into git SYNOPSIS -------- 'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ] - [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_nr_changes] + [ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev] [ -b branch_subdir ] [ -t trunk_subdir ] [ -T tag_subdir ] [ -s start_chg ] [ -m ] [ -M regex ] <SVN_repository_URL> [ <path> ] @@ -71,14 +71,11 @@ When importing incementally, you might need to edit the .git/svn2git file. regex. It can be used with -m to also see the default regexes. You must escape forward slashes. --l <max_num_changes>:: - Limit the number of SVN changesets we pull before quitting. - This option is necessary because the SVN library has serious memory - leaks; the recommended value for nontrivial imports is 100. +-l <max_rev>:: + Specify a maximum revision number to pull. - git-svnimport will still exit with a zero exit code. You can check - the size of the file ".git/svn2git" to determine whether to call - the importer again. + Formerly, this option controlled how many revisions to pull, due to + SVN memory leaks. (These have been worked around.) -v:: Verbosity: let 'svnimport' report what it is doing. diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 95de436c10..841c9dcf97 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -10,6 +10,26 @@ SYNOPSIS -------- 'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <name> [<head>] +OPTIONS +------- +-a:: + Make an unsigned, annotated tag object + +-s:: + Make a GPG-signed tag, using the default e-mail address's key + +-u <key-id>:: + Make a GPG-signed tag, using the given key + +-f:: + Replace an existing tag with the given name (instead of failing) + +-d:: + Delete an existing tag with the given name + +-m <msg>:: + Use the given tag message (instead of prompting) + DESCRIPTION ----------- Adds a 'tag' reference in .git/refs/tags/ @@ -23,7 +43,7 @@ creates a 'tag' object, and requires the tag message. Unless in the tag message. Otherwise just the SHA1 object name of the commit object is -written (i.e. an lightweight tag). +written (i.e. a lightweight tag). A GnuPG signed tag object will be created when `-s` or `-u <key-id>` is used. When `-u <key-id>` is not used, the diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt index 6413d525ce..b5b979242c 100644 --- a/Documentation/pull-fetch-param.txt +++ b/Documentation/pull-fetch-param.txt @@ -15,10 +15,10 @@ - ssh://host.xz/~/path/to/repo.git =============================================================== + - SSH Is the default transport protocol and also supports an - scp-like syntax. 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 and also supports an +scp-like syntax. Both syntaxes support username expansion, +as does the native git protocol. The following three are +identical to the last three above, respectively: + =============================================================== - host.xz:/path/to/repo.git/ @@ -26,8 +26,8 @@ - host.xz:path/to/repo.git =============================================================== + - To sync with a local directory, use: - +To sync with a local directory, use: ++ =============================================================== - /path/to/repo.git/ =============================================================== @@ -113,7 +113,7 @@ on the remote branch, merge it into your development branch with `git pull . remote-B`, while you are on `my-B` branch. The common `Pull: master:origin` mapping of a remote `master` branch to a local `origin` branch, which is then merged to a -ocal development branch, again typically named `master`, is made +local development branch, again typically named `master`, is made when you run `git clone` for you to follow this pattern. + [NOTE] diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt index e2dfb00ab1..cf7ba76ddf 100644 --- a/Documentation/tutorial.txt +++ b/Documentation/tutorial.txt @@ -898,9 +898,8 @@ file, which had no differences in the `mybranch` branch), and say: fatal: Merge requires file-level merging Nope. ... - merge: warning: conflicts during merge - ERROR: Merge conflict in hello. - fatal: merge program failed + Auto-merging hello + CONFLICT (content): Merge conflict in hello Automatic merge failed/prevented; fix up by hand ---------------- @@ -942,10 +941,10 @@ environment, is `git show-branch`. ------------------------------------------------ $ git show-branch master mybranch -* [master] Merged "mybranch" changes. +* [master] Merge work in mybranch ! [mybranch] Some work. -- -+ [master] Merged "mybranch" changes. ++ [master] Merge work in mybranch ++ [mybranch] Some work. ------------------------------------------------ @@ -998,10 +997,10 @@ looks like, or run `show-branch`, which tells you this. ------------------------------------------------ $ git show-branch master mybranch -! [master] Merged "mybranch" changes. - * [mybranch] Merged "mybranch" changes. +! [master] Merge work in mybranch + * [mybranch] Merge work in mybranch -- -++ [master] Merged "mybranch" changes. +++ [master] Merge work in mybranch ------------------------------------------------ |