diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 43 | ||||
-rw-r--r-- | Documentation/core-tutorial.txt | 16 | ||||
-rw-r--r-- | Documentation/diff-options.txt | 5 | ||||
-rw-r--r-- | Documentation/git-clone.txt | 2 | ||||
-rw-r--r-- | Documentation/git-commit.txt | 3 | ||||
-rw-r--r-- | Documentation/git-diff.txt | 58 | ||||
-rw-r--r-- | Documentation/git-merge-file.txt | 92 | ||||
-rw-r--r-- | Documentation/git-repo-config.txt | 14 | ||||
-rw-r--r-- | Documentation/git-reset.txt | 2 | ||||
-rw-r--r-- | Documentation/git-show.txt | 40 | ||||
-rw-r--r-- | Documentation/git-svnimport.txt | 13 | ||||
-rw-r--r-- | Documentation/git.txt | 3 | ||||
-rw-r--r-- | Documentation/tutorial-2.txt | 41 | ||||
-rw-r--r-- | Documentation/tutorial.txt | 2 |
14 files changed, 253 insertions, 81 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index f5a552ee87..ceac54b024 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -79,8 +79,11 @@ core.logAllRefUpdates:: file is automatically created for branch heads. This information can be used to determine what commit - was the tip of a branch "2 days ago". This value is - false by default (no automated creation of log files). + was the tip of a branch "2 days ago". + + This value is true by default in a repository that has + a working directory associated with it, and false by + default in a bare repository. core.repositoryFormatVersion:: Internal variable identifying the repository format and layout @@ -137,10 +140,6 @@ branch.<name>.merge:: this option, `git pull` defaults to merge the first refspec fetched. Specify multiple values to get an octopus merge. -color.pager:: - A boolean to enable/disable colored output when the pager is in - use (default is true). - color.diff:: When true (or `always`), always use colors in patch. When false (or `never`), never. When set to `auto`, use @@ -157,6 +156,24 @@ color.diff.<slot>:: `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, or `white`. +color.pager:: + A boolean to enable/disable colored output when the pager is in + use (default is true). + +color.status:: + A boolean to enable/disable color in the output of + gitlink:git-status[1]. May be set to `true` (or `always`), + `false` (or `never`) or `auto`, in which case colors are used + only when the output is to a terminal. Defaults to false. + +color.status.<slot>:: + Use customized color for status colorization. `<slot>` is + one of `header` (the header text of the status message), + `added` or `updated` (files which are added but not committed), + `changed` (files which are changed but not added in the index), + or `untracked` (files which are not tracked by git). The values of + these variables may be specified as in color.diff.<slot>. + diff.renameLimit:: The number of files to consider when performing the copy/rename detection; equivalent to the git diff option '-l'. @@ -271,20 +288,6 @@ showbranch.default:: The default set of branches for gitlink:git-show-branch[1]. See gitlink:git-show-branch[1]. -color.status:: - A boolean to enable/disable color in the output of - gitlink:git-status[1]. May be set to `true` (or `always`), - `false` (or `never`) or `auto`, in which case colors are used - only when the output is to a terminal. Defaults to false. - -color.status.<slot>:: - Use customized color for status colorization. `<slot>` is - one of `header` (the header text of the status message), - `updated` (files which are updated but not committed), - `changed` (files which are changed but not updated in the index), - or `untracked` (files which are not tracked by git). The values of - these variables may be specified as in color.diff.<slot>. - tar.umask:: By default, gitlink:git-tar-tree[1] sets file and directories modes to 0666 or 0777. While this is both useful and acceptable for projects diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt index 47505aa20a..5ea611748c 100644 --- a/Documentation/core-tutorial.txt +++ b/Documentation/core-tutorial.txt @@ -57,7 +57,7 @@ $ git-init-db to which git will reply ---------------- -defaulting to local storage area +Initialized empty Git repository in .git/ ---------------- which is just git's way of saying that you haven't been doing anything @@ -336,17 +336,9 @@ $ commit=$(echo 'Initial commit' | git-commit-tree $tree) $ git-update-ref HEAD $commit ------------------------------------------------ -which will say: - ----------------- -Committing initial tree 8988da15d077d4829fc51d8544c097def6644dbb ----------------- - -just to warn you about the fact that it created a totally new commit -that is not related to anything else. Normally you do this only *once* -for a project ever, and all later commits will be parented on top of an -earlier commit, and you'll never see this "Committing initial tree" -message ever again. +In this case this creates a totally new commit that is not related to +anything else. Normally you do this only *once* for a project ever, and +all later commits will be parented on top of an earlier commit. Again, normally you'd never actually do this by hand. There is a helpful script called `git commit` that will do all of this for you. So diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 9cdd171af7..f12082e134 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -21,6 +21,11 @@ deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. +--shortstat:: + Output only the last line of the --stat format containing total + number of modified files, as well as number of added and deleted + lines. + --summary:: Output a condensed summary of extended header information such as creations, renames and mode changes. diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 985043faca..bfddb21fee 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -100,7 +100,7 @@ OPTIONS defined default, typically `/usr/share/git-core/templates`. --use-separate-remote:: - Save remotes heads under `$GIT_DIR/remotes/origin/` instead + Save remotes heads under `$GIT_DIR/refs/remotes/origin/` instead of `$GIT_DIR/refs/heads/`. Only the local master branch is saved in the latter. This is the default. diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index 97d66ef4d2..0b74cd708e 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -113,6 +113,9 @@ but can be used to amend a merge commit. as well. This is usually not what you want unless you are concluding a conflicted merge. +-q|--quiet:: + Supress commit summary message. + \--:: Do not interpret any more arguments as options. diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 3144864d85..10fdf88dce 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -8,38 +8,54 @@ git-diff - Show changes between commits, commit and working tree, etc SYNOPSIS -------- -'git-diff' [ --diff-options ] <tree-ish>{0,2} [<path>...] +'git-diff' [ --diff-options ] <tree-ish>{0,2} [--] [<path>...] DESCRIPTION ----------- Show changes between two trees, a tree and the working tree, a tree and the index file, or the index file and the working tree. -The combination of what is compared with what is determined by -the number of trees given to the command. -* When no <tree-ish> is given, the working tree and the index - file are compared, using `git-diff-files`. +'git-diff' [--options] [--] [<path>...]:: -* When one <tree-ish> is given, the working tree and the named - tree are compared, using `git-diff-index`. The option - `--index` can be given to compare the index file and - the named tree. - `--cached` is a deprecated alias for `--index`. It's use is - discouraged. + This form is to view the changes you made relative to + the index (staging area for the next commit). In other + words, the differences are what you _could_ tell git to + further add to the index but you still haven't. You can + stage these changes by using gitlink:git-add[1]. + +'git-diff' [--options] --cached [<commit>] [--] [<path>...]:: + + This form is to view the changes you staged for the next + commit relative to the named <tree-ish>. Typically you + would want comparison with the latest commit, so if you + do not give <commit>, it defaults to HEAD. + +'git-diff' [--options] <commit> [--] [<path>...]:: + + This form is to view the changes you have in your + working tree relative to the named <commit>. You can + use HEAD to compare it with the latest commit, or a + branch name to compare with the tip of a different + branch. + +'git-diff' [--options] <commit> <commit> [--] [<path>...]:: + + This form is to view the changes between two <commit>, + for example, tips of two branches. + +Just in case if you are doing something exotic, it should be +noted that all of the <commit> in the above description can be +any <tree-ish>. -* When two <tree-ish>s are given, these two trees are compared - using `git-diff-tree`. OPTIONS ------- ---diff-options:: - '--diff-options' are passed to the `git-diff-files`, - `git-diff-index`, and `git-diff-tree` commands. See the - documentation for these commands for description. +include::diff-options.txt[] <path>...:: - The <path> arguments are also passed to `git-diff-\*` - commands. + The <paths> parameters, when given, are used to limit + the diff to the named paths (you can give directory + names and get diff for all files under them). EXAMPLES @@ -49,11 +65,11 @@ Various ways to check your working tree:: + ------------ $ git diff <1> -$ git diff --index <2> +$ git diff --cached <2> $ git diff HEAD <3> ------------ + -<1> changes in the working tree since your last git-update-index. +<1> changes in the working tree not yet staged for the next commit. <2> changes between the index and your last commit; what you would be committing if you run "git commit" without "-a" option. <3> changes in the working tree since your last commit; what you diff --git a/Documentation/git-merge-file.txt b/Documentation/git-merge-file.txt new file mode 100644 index 0000000000..29d3faa556 --- /dev/null +++ b/Documentation/git-merge-file.txt @@ -0,0 +1,92 @@ +git-merge-file(1) +================= + +NAME +---- +git-merge-file - three-way file merge + + +SYNOPSIS +-------- +[verse] +'git-merge-file' [-L <current-name> [-L <base-name> [-L <other-name>]]] + [-p|--stdout] [-q|--quiet] <current-file> <base-file> <other-file> + + +DESCRIPTION +----------- +git-file-merge incorporates all changes that lead from the `<base-file>` +to `<other-file>` into `<current-file>`. The result ordinarily goes into +`<current-file>`. git-merge-file is useful for combining separate changes +to an original. Suppose `<base-file>` is the original, and both +`<current-file>` and `<other-file>` are modifications of `<base-file>`. +Then git-merge-file combines both changes. + +A conflict occurs if both `<current-file>` and `<other-file>` have changes +in a common segment of lines. If a conflict is found, git-merge-file +normally outputs a warning and brackets the conflict with <<<<<<< and +>>>>>>> lines. A typical conflict will look like this: + + <<<<<<< A + lines in file A + ======= + lines in file B + >>>>>>> B + +If there are conflicts, the user should edit the result and delete one of +the alternatives. + +The exit value of this program is negative on error, and the number of +conflicts otherwise. If the merge was clean, the exit value is 0. + +git-merge-file is designed to be a minimal clone of RCS merge, that is, it +implements all of RCS merge's functionality which is needed by +gitlink:git[1]. + + +OPTIONS +------- + +-L <label>:: + This option may be given up to three times, and + specifies labels to be used in place of the + corresponding file names in conflict reports. That is, + `git-merge-file -L x -L y -L z a b c` generates output that + looks like it came from files x, y and z instead of + from files a, b and c. + +-p:: + Send results to standard output instead of overwriting + `<current-file>`. + +-q:: + Quiet; do not warn about conflicts. + + +EXAMPLES +-------- + +git merge-file README.my README README.upstream:: + + combines the changes of README.my and README.upstream since README, + tries to merge them and writes the result into README.my. + +git merge-file -L a -L b -L c tmp/a123 tmp/b234 tmp/c345:: + + merges tmp/a123 and tmp/c345 with the base tmp/b234, but uses labels + `a` and `c` instead of `tmp/a123` and `tmp/c345`. + + +Author +------ +Written by Johannes Schindelin <johannes.schindelin@gmx.de> + + +Documentation +-------------- +Documentation by Johannes Schindelin and the git-list <git@vger.kernel.org>, +with parts copied from the original documentation of RCS merge. + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt index 5bede9ac22..b379ec5075 100644 --- a/Documentation/git-repo-config.txt +++ b/Documentation/git-repo-config.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git-repo-config' [--global] [type] name [value [value_regex]] +'git-repo-config' [--global] [type] --add name value 'git-repo-config' [--global] [type] --replace-all name [value [value_regex]] 'git-repo-config' [--global] [type] --get name [value_regex] 'git-repo-config' [--global] [type] --get-all name [value_regex] @@ -23,7 +24,8 @@ You can query/set/replace/unset options with this command. The name is actually the section and the key separated by a dot, and the value will be escaped. -If you want to set/unset an option which can occur on multiple +Multiple lines can be added to an option by using the '--add' option. +If you want to update or unset an option which can occur on multiple lines, a POSIX regexp `value_regex` needs to be given. Only the existing values that match the regexp are updated or unset. If you want to handle the lines that do *not* match the regex, just @@ -53,6 +55,10 @@ OPTIONS Default behavior is to replace at most one line. This replaces all lines matching the key (and optionally the value_regex). +--add:: + Adds a new line to the option without altering any existing + values. This is the same as providing '^$' as the value_regex. + --get:: Get the value for a given key (optionally filtered by a regex matching the value). Returns error code 1 if the key was not @@ -194,6 +200,12 @@ To actually match only values with an exclamation mark, you have to % git repo-config section.key value '[!]' ------------ +To add a new proxy, without altering any of the existing ones, use + +------------ +% git repo-config core.gitproxy '"proxy" for example.com' +------------ + include::config.txt[] diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 73a0ffc410..4a4ceb6201 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -31,7 +31,7 @@ OPTIONS --soft:: Does not touch the index file nor the working tree at all, but requires them to be in a good order. This leaves all your changed - files "Updated but not checked in", as gitlink:git-status[1] would + files "Added but not yet committed", as gitlink:git-status[1] would put it. --hard:: diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt index 4c880a8717..98dea6125d 100644 --- a/Documentation/git-show.txt +++ b/Documentation/git-show.txt @@ -3,20 +3,27 @@ git-show(1) NAME ---- -git-show - Show one commit with difference it introduces +git-show - Show various types of objects SYNOPSIS -------- -'git-show' <option>... +'git-show' [options] <object>... DESCRIPTION ----------- -Shows commit log and textual diff for a single commit. The -command internally invokes 'git-rev-list' piped to -'git-diff-tree', and takes command line options for both of -these commands. It also presents the merge commit in a special -format as produced by 'git-diff-tree --cc'. +Shows one or more objects (blobs, trees, tags and commits). + +For commits it shows the log message and textual diff. It also +presents the merge commit in a special format as produced by +'git-diff-tree --cc'. + +For tags, it shows the tag message and the referenced objects. + +For trees, it shows the names (equivalent to gitlink:git-ls-tree[1] +with \--name-only). + +For plain blobs, it shows the plain contents. This manual page describes only the most frequently used options. @@ -28,6 +35,25 @@ OPTIONS include::pretty-formats.txt[] + +EXAMPLES +-------- + +git show v1.0.0:: + Shows the tag `v1.0.0`. + +git show v1.0.0^{tree}:: + Shows the tree pointed to by the tag `v1.0.0`. + +git show next~10:Documentation/README + Shows the contents of the file `Documentation/README` as + they were current in the 10th last commit of the branch + `next`. + +git show master:Makefile master:t/Makefile + Concatenates the contents of said Makefiles in the head + of the branch `master`. + Author ------ Written by Linus Torvalds <torvalds@osdl.org> and diff --git a/Documentation/git-svnimport.txt b/Documentation/git-svnimport.txt index b1b87c2fcd..2c7c7dad54 100644 --- a/Documentation/git-svnimport.txt +++ b/Documentation/git-svnimport.txt @@ -15,6 +15,7 @@ SYNOPSIS [ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ] [ -s start_chg ] [ -m ] [ -r ] [ -M regex ] [ -I <ignorefile_name> ] [ -A <author_file> ] + [ -P <path_from_trunk> ] <SVN_repository_URL> [ <path> ] @@ -103,9 +104,17 @@ repository without -A. -l <max_rev>:: Specify a maximum revision number to pull. ++ +Formerly, this option controlled how many revisions to pull, +due to SVN memory leaks. (These have been worked around.) - Formerly, this option controlled how many revisions to pull, - due to SVN memory leaks. (These have been worked around.) +-P <path_from_trunk>:: + Partial import of the SVN tree. ++ +By default, the whole tree on the SVN trunk (/trunk) is imported. +'-P my/proj' will import starting only from '/trunk/my/proj'. +This option is useful when you want to import one project from a +svn repo which hosts multiple projects under the same trunk. -v:: Verbosity: let 'svnimport' report what it is doing. diff --git a/Documentation/git.txt b/Documentation/git.txt index 6382ef0a02..2a9e97dac1 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -351,6 +351,9 @@ gitlink:git-init-db[1]:: Creates an empty git object database, or reinitialize an existing one. +gitlink:git-merge-file[1]:: + Runs a threeway merge. + gitlink:git-merge-index[1]:: Runs a merge for files needing merging. diff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt index 6389de5ef7..60e54777dc 100644 --- a/Documentation/tutorial-2.txt +++ b/Documentation/tutorial-2.txt @@ -18,18 +18,18 @@ Let's start a new project and create a small amount of history: $ mkdir test-project $ cd test-project $ git init-db -defaulting to local storage area +Initialized empty Git repository in .git/ $ echo 'hello world' > file.txt $ git add . $ git commit -a -m "initial commit" -Committing initial tree 92b8b694ffb1675e5975148e1121810081dbdffe +Created initial commit 54196cc2703dc165cbd373a65a4dcf22d50ae7f7 create mode 100644 file.txt $ echo 'hello world!' >file.txt $ git commit -a -m "add emphasis" +Created commit c4d59f390b9cfd4318117afde11d601c1085f241 ------------------------------------------------ -What are the 40 digits of hex that git responded to the first commit -with? +What are the 40 digits of hex that git responded to the commit with? We saw in part one of the tutorial that commits have names like this. It turns out that every object in the git history is stored under @@ -39,13 +39,25 @@ the same data twice (since identical data is given an identical SHA1 name), and that the contents of a git object will never change (since that would change the object's name as well). +It is expected that the content of the commit object you created while +following the example above generates a different SHA1 hash than +the one shown above because the commit object records the time when +it was created and the name of the person performing the commit. + We can ask git about this particular object with the cat-file -command--just cut-and-paste from the reply to the initial commit, to -save yourself typing all 40 hex digits: +command. Don't copy the 40 hex digits from this example but use those +from your own version. Note that you can shorten it to only a few +characters to save yourself typing all 40 hex digits: ------------------------------------------------ -$ git cat-file -t 92b8b694ffb1675e5975148e1121810081dbdffe -tree +$ git-cat-file -t 54196cc2 +commit +$ git-cat-file commit 54196cc2 +tree 92b8b694ffb1675e5975148e1121810081dbdffe +author J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500 +committer J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500 + +initial commit ------------------------------------------------ A tree can refer to one or more "blob" objects, each corresponding to @@ -102,8 +114,7 @@ $ find .git/objects/ and the contents of these files is just the compressed data plus a header identifying their length and their type. The type is either a -blob, a tree, a commit, or a tag. We've seen a blob and a tree now, -so next we should look at a commit. +blob, a tree, a commit, or a tag. The simplest commit to find is the HEAD commit, which we can find from .git/HEAD: @@ -342,23 +353,23 @@ situation: ------------------------------------------------ $ git status # -# Updated but not checked in: +# Added but not yet committed: # (will commit) # # new file: closing.txt # # -# Changed but not updated: -# (use git-update-index to mark for commit) +# Changed but not added: +# (use "git add file1 file2" to include for commit) # # modified: file.txt # ------------------------------------------------ Since the current state of closing.txt is cached in the index file, -it is listed as "updated but not checked in". Since file.txt has +it is listed as "added but not yet committed". Since file.txt has changes in the working directory that aren't reflected in the index, -it is marked "changed but not updated". At this point, running "git +it is marked "changed but not added". At this point, running "git commit" would create a commit that added closing.txt (with its new contents), but that didn't modify file.txt. diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt index 02dede320c..cb808d924b 100644 --- a/Documentation/tutorial.txt +++ b/Documentation/tutorial.txt @@ -38,7 +38,7 @@ $ git init-db Git will reply ------------------------------------------------ -defaulting to local storage area +Initialized empty Git repository in .git/ ------------------------------------------------ You've now initialized the working directory--you may notice a new |