From b288d9efccdc870a87fa612f162eff891f26a71f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 2 Jan 2007 00:04:15 +0000 Subject: [PATCH] Autogenerated HTML docs for v1.5.0-rc0-gf4bf2 --- fetch-options.txt | 11 ++++- git-clone.html | 18 +++++++- git-clone.txt | 12 ++++- git-fetch.html | 24 ++++++---- git-pull.html | 101 ++++++++++++++++++++----------------------- git-pull.txt | 69 +++++++++++------------------ pull-fetch-param.txt | 4 -- 7 files changed, 123 insertions(+), 116 deletions(-) diff --git a/fetch-options.txt b/fetch-options.txt index 13f34d3ca..5b4d184a7 100644 --- a/fetch-options.txt +++ b/fetch-options.txt @@ -36,6 +36,13 @@ -u, \--update-head-ok:: By default `git-fetch` refuses to update the head which corresponds to the current branch. This flag disables the - check. Note that fetching into the current branch will not - update the index and working directory, so use it with care. + check. This is purely for the internal use for `git-pull` + to communicate with `git-fetch`, and unless you are + implementing your own Porcelain you are not supposed to + use it. + +\--depth=:: + Deepen the history of a 'shallow' repository created by + `git clone` with `--depth=` option (see gitlink:git-clone[1]) + by the specified number of commits. diff --git a/git-clone.html b/git-clone.html index f8bb4345b..7be0c15d5 100644 --- a/git-clone.html +++ b/git-clone.html @@ -275,7 +275,7 @@ git-clone(1) Manual Page
git-clone [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare] [-o <name>] [-u <upload-pack>] [--reference <repository>] - <repository> [<directory>]
+ [--depth=<depth>] <repository> [<directory>]

DESCRIPTION

@@ -413,6 +413,20 @@ configuration variables.

+--depth=<depth> +
+
+

+ Create a shallow clone with a history truncated to the + specified number of revs. A shallow repository has + number of limitations (you cannot clone or fetch from + it, nor push from nor into it), but is adequate if you + want to only look at near the tip of a large project + with a long history, and would want to send in a fixes + as patches. +

+
+
<repository>
@@ -507,7 +521,7 @@ Create a repository on the kernel.org machine that borrows from Linus
diff --git a/git-clone.txt b/git-clone.txt index 96523204d..e7085fdf5 100644 --- a/git-clone.txt +++ b/git-clone.txt @@ -11,7 +11,7 @@ SYNOPSIS [verse] 'git-clone' [--template=] [-l [-s]] [-q] [-n] [--bare] [-o ] [-u ] [--reference ] - [] + [--depth=] [] DESCRIPTION ----------- @@ -31,6 +31,7 @@ the remote branch heads under `$GIT_DIR/refs/remotes/origin` and by initializing `remote.origin.url` and `remote.origin.fetch` configuration variables. + OPTIONS ------- --local:: @@ -95,6 +96,15 @@ OPTIONS if unset the templates are taken from the installation defined default, typically `/usr/share/git-core/templates`. +--depth=:: + Create a 'shallow' clone with a history truncated to the + specified number of revs. A shallow repository has + number of limitations (you cannot clone or fetch from + it, nor push from nor into it), but is adequate if you + want to only look at near the tip of a large project + with a long history, and would want to send in a fixes + as patches. + :: The (possibly remote) repository to clone from. It can be any URL git-fetch supports. diff --git a/git-fetch.html b/git-fetch.html index c21c778d5..4b108f597 100644 --- a/git-fetch.html +++ b/git-fetch.html @@ -357,8 +357,20 @@ operation done by "git merge".

By default git-fetch refuses to update the head which corresponds to the current branch. This flag disables the - check. Note that fetching into the current branch will not - update the index and working directory, so use it with care. + check. This is purely for the internal use for git-pull + to communicate with git-fetch, and unless you are + implementing your own Porcelain you are not supposed to + use it. +

+ +
+--depth=<depth> +
+
+

+ Deepen the history of a shallow repository created by + git clone with --depth=<depth> option (see git-clone(1)) + by the specified number of commits.

@@ -418,11 +430,7 @@ is created by git branch my-B remote-B (or its equivalent git checkout -b my-B remote-B). Run git fetch to keep track of the progress of the remote side, and when you see something new 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 -local development branch, again typically named master, is made -when you run git clone for you to follow this pattern. +git pull . remote-B, while you are on my-B branch.
@@ -619,7 +627,7 @@ Junio C Hamano <junkio@cox.net>

diff --git a/git-pull.html b/git-pull.html index 78e856e79..04b93fe76 100644 --- a/git-pull.html +++ b/git-pull.html @@ -401,8 +401,20 @@ when merging local branches into the current branch.

By default git-fetch refuses to update the head which corresponds to the current branch. This flag disables the - check. Note that fetching into the current branch will not - update the index and working directory, so use it with care. + check. This is purely for the internal use for git-pull + to communicate with git-fetch, and unless you are + implementing your own Porcelain you are not supposed to + use it. +

+ +
+--depth=<depth> +
+
+

+ Deepen the history of a shallow repository created by + git clone with --depth=<depth> option (see git-clone(1)) + by the specified number of commits.

@@ -462,11 +474,7 @@ is created by git branch my-B remote-B (or its equivalent git checkout -b my-B remote-B). Run git fetch to keep track of the progress of the remote side, and when you see something new 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 -local development branch, again typically named master, is made -when you run git clone for you to follow this pattern. +git pull . remote-B, while you are on my-B branch.
@@ -710,17 +718,23 @@ git pull, git pull origin

- Fetch the default head from the repository you cloned - from and merge it into your current branch. + Update the remote-tracking branches for the repository + you cloned from, then merge one of them into your + current branch. Normally the branch merged in is + the HEAD of the remote repository, but the choice is + determined by the branch.<name>.remote and + branch.<name>.merge options; see git-repo-config(1) + for details.

-git pull -s ours . obsolete +git pull origin next

- Merge local branch obsolete into the current branch, - using ours merge strategy. + Merge into the current branch the remote branch next; + leaves a copy of next temporarily in FETCH_HEAD, but + does not update any remote-tracking branches.

@@ -733,6 +747,15 @@ git pull . fixes enhancements

+git pull -s ours . obsolete +
+
+

+ Merge local branch obsolete into the current branch, + using ours merge strategy. +

+
+
git pull --no-commit . maint
@@ -752,48 +775,16 @@ Command line pull of multiple branches from one repository
-
$ cat .git/remotes/origin
-URL: git://git.kernel.org/pub/scm/git/git.git
-Pull: master:origin
-
-$ git checkout master
-$ git fetch origin master:origin +pu:pu maint:maint
-$ git pull . origin
-
-

Here, a typical .git/remotes/origin file from a -git-clone operation is used in combination with -command line options to git-fetch to first update -multiple branches of the local repository and then -to merge the remote origin branch into the local -master branch. The local pu branch is updated -even if it does not result in a fast forward update. -Here, the pull can obtain its objects from the local -repository using ., as the previous git-fetch is -known to have already obtained and made available -all the necessary objects.

-
-
-Pull of multiple branches from one repository using .git/remotes file -
-
-
-
-
$ cat .git/remotes/origin
-URL: git://git.kernel.org/pub/scm/git/git.git
-Pull: master:origin
-Pull: +pu:pu
-Pull: maint:maint
-
-$ git checkout master
-$ git pull origin
+
$ git checkout master
+$ git fetch origin +pu:pu maint:tmp
+$ git pull . tmp
-

Here, a typical .git/remotes/origin file from a -git-clone operation has been hand-modified to include -the branch-mapping of additional remote and local -heads directly. A single git-pull operation while -in the master branch will fetch multiple heads and -merge the remote origin head into the current, -local master branch.

+

This updates (or creates, as necessary) branches pu and tmp +in the local repository by fetching from the branches +(respectively) pu and maint from the remote repository.

+

The pu branch will be updated even if it is does not +fast-forward; the others will not be.

+

The final command then merges the newly fetched tmp into master.

If you tried a pull which resulted in a complex conflicts and @@ -802,7 +793,7 @@ would want to start over, you can recover with

SEE ALSO

Author

@@ -821,7 +812,7 @@ Junio C Hamano and the git-list <git@vger.kernel.org>.

diff --git a/git-pull.txt b/git-pull.txt index 2a5aea73b..13be99200 100644 --- a/git-pull.txt +++ b/git-pull.txt @@ -37,17 +37,27 @@ EXAMPLES -------- git pull, git pull origin:: - Fetch the default head from the repository you cloned - from and merge it into your current branch. - -git pull -s ours . obsolete:: - Merge local branch `obsolete` into the current branch, - using `ours` merge strategy. + Update the remote-tracking branches for the repository + you cloned from, then merge one of them into your + current branch. Normally the branch merged in is + the HEAD of the remote repository, but the choice is + determined by the branch..remote and + branch..merge options; see gitlink:git-repo-config[1] + for details. + +git pull origin next:: + Merge into the current branch the remote branch `next`; + leaves a copy of `next` temporarily in FETCH_HEAD, but + does not update any remote-tracking branches. git pull . fixes enhancements:: Bundle local branch `fixes` and `enhancements` on top of the current branch, making an Octopus merge. +git pull -s ours . obsolete:: + Merge local branch `obsolete` into the current branch, + using `ours` merge strategy. + git pull --no-commit . maint:: Merge local branch `maint` into the current branch, but do not make a commit automatically. This can be used @@ -61,48 +71,19 @@ release/version name would be acceptable. Command line pull of multiple branches from one repository:: + ------------------------------------------------ -$ cat .git/remotes/origin -URL: git://git.kernel.org/pub/scm/git/git.git -Pull: master:origin - $ git checkout master -$ git fetch origin master:origin +pu:pu maint:maint -$ git pull . origin +$ git fetch origin +pu:pu maint:tmp +$ git pull . tmp ------------------------------------------------ + -Here, a typical `.git/remotes/origin` file from a -`git-clone` operation is used in combination with -command line options to `git-fetch` to first update -multiple branches of the local repository and then -to merge the remote `origin` branch into the local -`master` branch. The local `pu` branch is updated -even if it does not result in a fast forward update. -Here, the pull can obtain its objects from the local -repository using `.`, as the previous `git-fetch` is -known to have already obtained and made available -all the necessary objects. - - -Pull of multiple branches from one repository using `.git/remotes` file:: +This updates (or creates, as necessary) branches `pu` and `tmp` +in the local repository by fetching from the branches +(respectively) `pu` and `maint` from the remote repository. + ------------------------------------------------- -$ cat .git/remotes/origin -URL: git://git.kernel.org/pub/scm/git/git.git -Pull: master:origin -Pull: +pu:pu -Pull: maint:maint - -$ git checkout master -$ git pull origin ------------------------------------------------- +The `pu` branch will be updated even if it is does not +fast-forward; the others will not be. + -Here, a typical `.git/remotes/origin` file from a -`git-clone` operation has been hand-modified to include -the branch-mapping of additional remote and local -heads directly. A single `git-pull` operation while -in the `master` branch will fetch multiple heads and -merge the remote `origin` head into the current, -local `master` branch. +The final command then merges the newly fetched `tmp` into master. If you tried a pull which resulted in a complex conflicts and @@ -112,7 +93,7 @@ gitlink:git-reset[1]. SEE ALSO -------- -gitlink:git-fetch[1], gitlink:git-merge[1] +gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1] Author diff --git a/pull-fetch-param.txt b/pull-fetch-param.txt index e852f41a3..8d4e950ab 100644 --- a/pull-fetch-param.txt +++ b/pull-fetch-param.txt @@ -39,10 +39,6 @@ checkout -b my-B remote-B`). Run `git fetch` to keep track of the progress of the remote side, and when you see something new 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 -local development branch, again typically named `master`, is made -when you run `git clone` for you to follow this pattern. + [NOTE] There is a difference between listing multiple -- 2.26.2