summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/.gitignore5
-rw-r--r--Documentation/Makefile18
-rw-r--r--Documentation/SubmittingPatches174
-rw-r--r--Documentation/git-add-script.txt17
-rw-r--r--Documentation/git-branch-script.txt19
-rw-r--r--Documentation/git-cherry.txt22
-rw-r--r--Documentation/git-count-objects-script.txt18
-rw-r--r--Documentation/git-fetch-script.txt23
-rw-r--r--Documentation/git-mailsplit.txt18
-rw-r--r--Documentation/git-octopus-script.txt39
-rw-r--r--Documentation/git-patch-id.txt19
-rw-r--r--Documentation/git-pull-script.txt9
-rw-r--r--Documentation/git-push-script.txt14
-rw-r--r--Documentation/git-rebase-script.txt17
-rw-r--r--Documentation/git-relink-script.txt19
-rw-r--r--Documentation/git-resolve-script.txt14
-rw-r--r--Documentation/git-revert-script.txt18
-rw-r--r--Documentation/git-send-pack.txt37
-rw-r--r--Documentation/git-sh-setup-script.txt18
-rw-r--r--Documentation/git-stripspace.txt15
-rw-r--r--Documentation/git-verify-tag-script.txt16
-rw-r--r--Documentation/git.txt87
-rw-r--r--Documentation/glossary.txt14
-rwxr-xr-xDocumentation/howto-index.sh49
-rw-r--r--Documentation/howto/make-dist.txt5
-rw-r--r--Documentation/howto/rebase-and-edit.txt3
-rw-r--r--Documentation/howto/rebase-from-internal-branch.txt5
-rw-r--r--Documentation/howto/rebuild-from-update-hook.txt83
-rw-r--r--Documentation/howto/using-topic-branches.txt70
-rwxr-xr-xDocumentation/install-webdoc.sh25
-rw-r--r--Documentation/pull-fetch-param.txt80
-rw-r--r--Documentation/tutorial.txt74
32 files changed, 770 insertions, 274 deletions
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
new file mode 100644
index 0000000..dad52b8
--- /dev/null
+++ b/Documentation/.gitignore
@@ -0,0 +1,5 @@
+*.xml
+*.html
+*.1
+*.7
+howto-index.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 91added..bd6833b 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,9 +1,10 @@
-MAN1_TXT=$(wildcard git-*.txt)
+MAN1_TXT=$(wildcard git-*.txt) gitk.txt
MAN7_TXT=git.txt
DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN7_TXT))
DOC_HTML += glossary.html
DOC_HTML += tutorial.html
+DOC_HTML += howto-index.html
DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
@@ -44,7 +45,7 @@ git-diff-%.txt: diff-format.txt diff-options.txt
touch $@
clean:
- rm -f *.xml *.html *.1 *.7
+ rm -f *.xml *.html *.1 *.7 howto-index.txt
%.html : %.txt
asciidoc -b xhtml11 -d manpage $<
@@ -62,3 +63,16 @@ glossary.html : glossary.txt sort_glossary.pl
tutorial.html : tutorial.txt
asciidoc -b xhtml11 tutorial.txt
+
+howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
+ rm -f $@+ $@
+ sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
+ mv $@+ $@
+
+howto-index.html: howto-index.txt
+ asciidoc -b xhtml11 howto-index.txt
+
+WEBDOC_DEST = /pub/software/scm/git/docs
+
+install-webdoc : html
+ sh ./install-webdoc.sh $(WEBDOC_DEST)
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 6121e90..fd9881f 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -73,14 +73,25 @@ MIME-attached change being accepted, but it makes it more likely
that it will be postponed.
Exception: If your mailer is mangling patches then someone may ask
-you to re-send them using MIME.
+you to re-send them using MIME, that is OK.
-Note that your maintainer does not subscribe to the git mailing
-list (he reads it via mail-to-news gateway). If your patch is
-for discussion first, send it "To:" the mailing list, and
-optoinally "cc:" him. If it is trivially correct or after list
-discussion reached consensus, send it "To:" the maintainer and
-optionally "cc:" the list.
+Do not PGP sign your patch, at least for now. Most likely, your
+maintainer or other people on the list would not have your PGP
+key and would not bother obtaining it anyway. Your patch is not
+judged by who you are; a good patch from an unknown origin has a
+far better chance of being accepted than a patch from a known,
+respected origin that is done poorly or does incorrect things.
+
+If you really really really really want to do a PGP signed
+patch, format it as "multipart/signed", not a text/plain message
+that starts with '-----BEGIN PGP SIGNED MESSAGE-----'. That is
+not a text/plain, it's something else.
+
+Note that your maintainer does not necessarily read everything
+on the git mailing list. If your patch is for discussion first,
+send it "To:" the mailing list, and optionally "cc:" him. If it
+is trivially correct or after the list reached a consensus, send
+it "To:" the maintainer and optionally "cc:" the list.
(6) Sign your work
@@ -128,3 +139,152 @@ then you just add a line saying
Some people also put extra tags at the end. They'll just be ignored for
now, but you can do this to mark internal company procedures or just
point out some special detail about the sign-off.
+
+
+------------------------------------------------
+MUA specific hints
+
+Some of patches I receive or pick up from the list share common
+patterns of breakage. Please make sure your MUA is set up
+properly not to corrupt whitespaces. Here are two common ones
+I have seen:
+
+* Empty context lines that do not have _any_ whitespace.
+
+* Non empty context lines that have one extra whitespace at the
+ beginning.
+
+One test you could do yourself if your MUA is set up correctly is:
+
+* Send the patch to yourself, exactly the way you would, except
+ To: and Cc: lines, which would not contain the list and
+ maintainer address.
+
+* Save that patch to a file in UNIX mailbox format. Call it say
+ a.patch.
+
+* Try to apply to the tip of the "master" branch from the
+ git.git public repository:
+
+ $ git fetch http://kernel.org/pub/scm/git/git.git master:test-apply
+ $ git checkout test-apply
+ $ git reset --hard
+ $ git applymbox a.patch
+
+If it does not apply correctly, there can be various reasons.
+
+* Your patch itself does not apply cleanly. That is _bad_ but
+ does not have much to do with your MUA. Please rebase the
+ patch appropriately.
+
+* Your MUA corrupted your patch; applymbox would complain that
+ the patch does not apply. Look at .dotest/ subdirectory and
+ see what 'patch' file contains and check for the common
+ corruption patterns mentioned above.
+
+* While you are at it, check what are in 'info' and
+ 'final-commit' files as well. If what is in 'final-commit' is
+ not exactly what you would want to see in the commit log
+ message, it is very likely that your maintainer would end up
+ hand editing the log message when he applies your patch.
+ Things like "Hi, this is my first patch.\n", if you really
+ want to put in the patch e-mail, should come after the
+ three-dash line that signals the end of the commit message.
+
+
+Pine
+----
+
+(Johannes Schindelin)
+
+I don't know how many people still use pine, but for those poor
+souls it may be good to mention that the quell-flowed-text is
+needed for recent versions.
+
+... the "no-strip-whitespace-before-send" option, too. AFAIK it
+was introduced in 4.60.
+
+(Linus Torvalds)
+
+And 4.58 needs at least this.
+
+---
+diff-tree 8326dd8350be64ac7fc805f6563a1d61ad10d32c (from e886a61f76edf5410573e92e38ce22974f9c40f1)
+Author: Linus Torvalds <torvalds@g5.osdl.org>
+Date: Mon Aug 15 17:23:51 2005 -0700
+
+ Fix pine whitespace-corruption bug
+
+ There's no excuse for unconditionally removing whitespace from
+ the pico buffers on close.
+
+diff --git a/pico/pico.c b/pico/pico.c
+--- a/pico/pico.c
++++ b/pico/pico.c
+@@ -219,7 +219,9 @@ PICO *pm;
+ switch(pico_all_done){ /* prepare for/handle final events */
+ case COMP_EXIT : /* already confirmed */
+ packheader();
++#if 0
+ stripwhitespace();
++#endif
+ c |= COMP_EXIT;
+ break;
+
+
+
+Thunderbird
+-----------
+
+(A Large Angry SCM)
+
+Here are some hints on how to successfully submit patches inline using
+Thunderbird. [*3*]
+
+This recipe appears to work with the current [*1*] Thunderbird from Suse.
+
+The following Thunderbird extensions are needed:
+ AboutConfig 0.5
+ http://aboutconfig.mozdev.org/
+ External Editor 0.5.4
+ http://extensionroom.mozdev.org/more-info/exteditor
+
+1) Prepare the patch as a text file using your method of choice.
+
+2) Before opening a compose window, use Edit->Account Settings to
+uncheck the "Compose messages in HTML format" setting in the
+"Composition & Addressing" panel of the account to be used to send the
+patch. [*2*]
+
+3) In the main Thunderbird window, _before_ you open the compose window
+for the patch, use Tools->about:config to set the following to the
+indicated values:
+ mailnews.send_plaintext_flowed => false
+ mailnews.wraplength => 999
+
+4) Open a compose window and click the external editor icon.
+
+5) In the external editor window, read in the patch file and exit the
+editor normally.
+
+6) Back in the compose window: Add whatever other text you wish to the
+message, complete the addressing and subject fields, and press send.
+
+7) Optionally, undo the about:config/account settings changes made in
+steps 2 & 3.
+
+
+[Footnotes]
+*1* Version 1.0 (20041207) from the MozillaThunderbird-1.0-5 rpm of Suse
+9.3 professional updates.
+
+*2* It may be possible to do this with about:config and the following
+settings but I haven't tried, yet.
+ mail.html_compose => false
+ mail.identity.default.compose_html => false
+ mail.identity.id?.compose_html => false
+
+*3* Even after following these hints, Thunderbird will still trim
+trailing whitespace from each line. I currently have no work around for
+for this issue.
+
diff --git a/Documentation/git-add-script.txt b/Documentation/git-add-script.txt
index 866d9c2..3001143 100644
--- a/Documentation/git-add-script.txt
+++ b/Documentation/git-add-script.txt
@@ -3,26 +3,21 @@ git-add-script(1)
NAME
----
-git-add-script - Some git command not yet documented.
-
+git-add-script - Add files to the cache.
SYNOPSIS
--------
-'git-add-script' [ --option ] <args>...
+'git-add-script' <file>...
DESCRIPTION
-----------
-Does something not yet documented.
-
+A simple wrapper to git-update-cache to add files to the cache for people used
+to do "cvs add".
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+<file>...::
+ Files to add to the cache.
Author
------
diff --git a/Documentation/git-branch-script.txt b/Documentation/git-branch-script.txt
index fe9a041..3ace8ad 100644
--- a/Documentation/git-branch-script.txt
+++ b/Documentation/git-branch-script.txt
@@ -3,26 +3,27 @@ git-branch-script(1)
NAME
----
-git-branch-script - Some git command not yet documented.
-
+git-branch-script - Create a new branch.
SYNOPSIS
--------
-'git-branch-script' [ --option ] <args>...
+'git-branch-script' [<branchname> [start-point]]
DESCRIPTION
-----------
-Does something not yet documented.
+If no argument is provided, show available branches and mark current
+branch with star. Otherwise, create a new branch of name <branchname>.
+If a starting point is also specified, that will be where the branch is
+created, otherwise it will be created at the current HEAD.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
+<branchname>::
+ The name of the branch to create.
+start-point::
+ Where to make the branch; defaults to HEAD.
Author
------
diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt
index 14d0bd5..9ff7bc2 100644
--- a/Documentation/git-cherry.txt
+++ b/Documentation/git-cherry.txt
@@ -3,26 +3,30 @@ git-cherry(1)
NAME
----
-git-cherry - Some git command not yet documented.
-
+git-cherry - Find commits not merged upstream.
SYNOPSIS
--------
-'git-cherry' [ --option ] <args>...
+'git-cherry' [-v] <upstream> [<head>]
DESCRIPTION
-----------
-Does something not yet documented.
-
+Each commit between the fork-point and <head> is examined, and compared against
+the change each commit between the fork-point and <upstream> introduces.
+Commits already included in upstream are prefixed with '-' (meaning "drop from
+my local pull"), while commits missing from upstream are prefixed with '+'
+(meaning "add to the updated upstream").
OPTIONS
-------
---option::
- Some option not yet documented.
+-v::
+ Verbose.
-<args>...::
- Some argument not yet documented.
+<upstream>::
+ Upstream branch to compare against.
+<head>::
+ Working branch; defaults to HEAD.
Author
------
diff --git a/Documentation/git-count-objects-script.txt b/Documentation/git-count-objects-script.txt
index 2543617..8a3cedf 100644
--- a/Documentation/git-count-objects-script.txt
+++ b/Documentation/git-count-objects-script.txt
@@ -3,26 +3,16 @@ git-count-objects-script(1)
NAME
----
-git-count-objects-script - Some git command not yet documented.
-
+git-count-objects-script - Reports on unpacked objects.
SYNOPSIS
--------
-'git-count-objects-script' [ --option ] <args>...
+'git-count-objects-script'
DESCRIPTION
-----------
-Does something not yet documented.
-
-
-OPTIONS
--------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+This counts the number of unpacked object files and disk space consumed by
+them, to help you decide when it is a good time to repack.
Author
------
diff --git a/Documentation/git-fetch-script.txt b/Documentation/git-fetch-script.txt
index db3086c..d15222b 100644
--- a/Documentation/git-fetch-script.txt
+++ b/Documentation/git-fetch-script.txt
@@ -1,6 +1,6 @@
git-fetch-script(1)
===================
-v0.99.4, Aug 2005
+v0.99.5, Aug 2005
NAME
----
@@ -9,24 +9,17 @@ git-fetch-script - Download objects and a head from another repository.
SYNOPSIS
--------
-'git-fetch-script' <repository> [ <head> | tag <tag> ]
+'git-fetch-script' <repository> <refspec>...
DESCRIPTION
-----------
-Fetches a named head or a tag from another repository, along
-with the objects necessary to complete that head or tag. The
-head to pull defaults to HEAD if unspecified. The head or tag
-fetched from the remote repository is stored in
-$GIT_DIR/FETCH_HEAD.
-
-When a <tag> is specified, the <tag> fetched from the remote is
-also copied to the local $GIT_DIR/tags/<tag> file. When no
-<head> nor <tag> is specified, and <repository> was specified
-with the short-hand notation (i.e. naming a file under the
-$GIT_DIR/branches directory), the head fetched from the remote
-repository is also copied to the local $GIT_DIR/heads/<repository>
-file.
+Fetches named heads or tags from another repository, along with
+the objects necessary to complete them.
+
+The ref names and their object names of fetched refs are stored
+in $GIT_DIR/FETCH_HEAD. This information is left for a later merge
+operation done by "git resolve" or "git octopus".
OPTIONS
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index 617276a..789d3a9 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -3,26 +3,24 @@ git-mailsplit(1)
NAME
----
-git-mailsplit - Some git command not yet documented.
-
+git-mailsplit - Totally braindamaged mbox splitter program.
SYNOPSIS
--------
-'git-mailsplit' [ --option ] <args>...
+'git-mailsplit' <mbox> <directory>
DESCRIPTION
-----------
-Does something not yet documented.
-
+Splits a mbox file into a list of files: "0001" "0002" .. in the specified
+directory so you can process them further from there.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
+<mbox>::
+ Mbox file to split.
+<directory>::
+ Directory in which to place the individual messages.
Author
------
diff --git a/Documentation/git-octopus-script.txt b/Documentation/git-octopus-script.txt
new file mode 100644
index 0000000..f7a073d
--- /dev/null
+++ b/Documentation/git-octopus-script.txt
@@ -0,0 +1,39 @@
+git-octopus-script(1)
+=====================
+v0.99.5, Aug 2005
+
+NAME
+----
+git-octopus-script - Merge more than two commits.
+
+
+SYNOPSIS
+--------
+'git-octopus'
+
+DESCRIPTION
+-----------
+After running 'git fetch', $GIT_DIR/FETCH_HEAD contains the
+following information, one line per remote ref:
+
+------------------------------------------------
+<object name> <ref name> from <repository>
+------------------------------------------------
+
+Using this information, create and commit an Octopus merge on
+top of the current HEAD.
+
+
+Author
+------
+Written by Junio C Hamano <junkio@cox.net>
+
+
+Documentation
+--------------
+Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
+
+GIT
+---
+Part of the link:git.html[git] suite
+
diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt
index 9a4abd1..b6fa2a8 100644
--- a/Documentation/git-patch-id.txt
+++ b/Documentation/git-patch-id.txt
@@ -3,26 +3,25 @@ git-patch-id(1)
NAME
----
-git-patch-id - Some git command not yet documented.
-
+git-patch-id - Generate a patch ID.
SYNOPSIS
--------
-'git-patch-id' [ --option ] <args>...
+'git-patch-id' < <patch>
DESCRIPTION
-----------
-Does something not yet documented.
+A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with
+whitespace and line numbers ignored. As such, it's "reasonably stable", but at
+the same time also reasonably unique, ie two patches that have the same "patch
+ID" are almost guaranteed to be the same thing.
+IOW, you can use this thing to look for likely duplicate commits.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+<patch>::
+ The diff to create the ID of.
Author
------
diff --git a/Documentation/git-pull-script.txt b/Documentation/git-pull-script.txt
index ad9d3ab..8111813 100644
--- a/Documentation/git-pull-script.txt
+++ b/Documentation/git-pull-script.txt
@@ -9,13 +9,16 @@ git-pull-script - Pull and merge from another repository.
SYNOPSIS
--------
-'git-pull-script' <repository> [ <head> | tag <tag> ]
+'git-pull-script' <repository> <refspec>...
DESCRIPTION
-----------
-Runs 'git-fetch-script' with the given parameters, then
-'git-resolve-script' to merge the local HEAD and FETCH_HEAD.
+Runs 'git-fetch-script' with the given parameters.
+
+When only one ref is downloaded, runs 'git resolve' to merge it
+into the local HEAD. Otherwise uses 'git octopus' to merge them
+into the local HEAD.
OPTIONS
diff --git a/Documentation/git-push-script.txt b/Documentation/git-push-script.txt
index 3c1208d..556682f 100644
--- a/Documentation/git-push-script.txt
+++ b/Documentation/git-push-script.txt
@@ -3,25 +3,23 @@ git-push-script(1)
NAME
----
-git-push-script - Some git command not yet documented.
+git-push-script - Update remote refs along with associated objects.
SYNOPSIS
--------
-'git-push-script' [ --option ] <args>...
+'git-push-script' [--all] [--force] <repository> <refspec>...
DESCRIPTION
-----------
-Does something not yet documented.
+
+Updates remote refs using local refs, while sending objects
+necessary to complete the given refs.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
+include::pull-fetch-param.txt[]
Author
diff --git a/Documentation/git-rebase-script.txt b/Documentation/git-rebase-script.txt
index ba7cbb7..8f14186 100644
--- a/Documentation/git-rebase-script.txt
+++ b/Documentation/git-rebase-script.txt
@@ -3,26 +3,23 @@ git-rebase-script(1)
NAME
----
-git-rebase-script - Some git command not yet documented.
-
+git-rebase-script - Rebase local commits to new upstream head.
SYNOPSIS
--------
-'git-rebase-script' [ --option ] <args>...
+'git-rebase-script' <upstream> [<head>]
DESCRIPTION
-----------
-Does something not yet documented.
-
+Rebases local commits to the new head of the upstream tree.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
+<upstream>::
+ Upstream branch to compare against.
+<head>::
+ Working branch; defaults to HEAD.
Author
------
diff --git a/Documentation/git-relink-script.txt b/Documentation/git-relink-script.txt
index 4c2b435..99c05d4 100644
--- a/Documentation/git-relink-script.txt
+++ b/Documentation/git-relink-script.txt
@@ -3,26 +3,25 @@ git-relink-script(1)
NAME
----
-git-relink-script - Some git command not yet documented.
-
+git-relink-script - Hardlink common objects in local repositories.
SYNOPSIS
--------
-'git-relink-script' [ --option ] <args>...
+'git-relink-script' [--safe] <dir> <dir> [<dir>]\*
DESCRIPTION
-----------
-Does something not yet documented.
-
+This will scan 2 or more object repositories and look for common objects, check
+if they are hardlinked, and replace one with a hardlink to the other if not.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
+--safe::
+ Stops if two objects with the same hash exist but have different sizes.
+ Default is to warn and continue.
+<dir>::
+ Directories containing a .git/objects/ subdirectory.
Author
------
diff --git a/Documentation/git-resolve-script.txt b/Documentation/git-resolve-script.txt
index 99c399a..77076aa 100644
--- a/Documentation/git-resolve-script.txt
+++ b/Documentation/git-resolve-script.txt
@@ -1,19 +1,25 @@
git-resolve-script(1)
=====================
-v0.99.4, Aug 2005
+v0.99.5, Aug 2005
NAME
----
-git-resolve-script - Script used to merge two trees
+git-resolve-script - Merge two commits
SYNOPSIS
--------
-'git-resolve-script'
+'git resolve' <current> <merged> <message>
DESCRIPTION
-----------
-This script is used by Linus to merge two trees.
+Given two commits and a merge message, merge the <merged> commit
+into <current> commit, with the commit log message <message>.
+
+When <current> is a descendant of <merged>, or <current> is an
+ancestor of <merged>, no new commit is created and the <message>
+is ignored. The former is informally called "already up to
+date", and the latter is often called "fast forward".
Author
diff --git a/Documentation/git-revert-script.txt b/Documentation/git-revert-script.txt
index 8a532e6..727073e 100644
--- a/Documentation/git-revert-script.txt
+++ b/Documentation/git-revert-script.txt
@@ -3,26 +3,22 @@ git-revert-script(1)
NAME
----
-git-revert-script - Some git command not yet documented.
-
+git-revert-script - Revert an existing commit.
SYNOPSIS
--------
-'git-revert-script' [ --option ] <args>...
+'git-revert-script' <commit>
DESCRIPTION
-----------
-Does something not yet documented.
-
+Given one existing commit, revert the change the patch introduces, and record a
+new commit that records it. This requires your working tree to be clean (no
+modifications from the HEAD commit).
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+<commit>::
+ Commit to revert.
Author
------
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index 6192c5d..5ed25f5 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -9,12 +9,12 @@ git-send-pack - Push missing objects packed.
SYNOPSIS
--------
-'git-send-pack' [--all] [--exec=<git-receive-pack>] [<host>:]<directory> [<head>...]
+'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [<host>:]<directory> [<ref>...]
DESCRIPTION
-----------
Invokes 'git-receive-pack' on a possibly remote repository, and
-updates it from the current repository, sending named heads.
+updates it from the current repository, sending named refs.
OPTIONS
@@ -29,6 +29,13 @@ OPTIONS
Instead of explicitly specifying which refs to update,
update all refs that locally exist.
+--force::
+ Usually, the command refuses to update a remote ref that
+ is not an ancestor of the local ref used to overwrite it.
+ This flag disables the check. What this means is that
+ the remote repository can lose commits; use it with
+ care.
+
<host>::
A remote host to house the repository. When this
part is specified, 'git-receive-pack' is invoked via
@@ -37,7 +44,7 @@ OPTIONS
<directory>::
The repository to update.
-<head>...:
+<ref>...:
The remote refs to update.
@@ -48,24 +55,25 @@ There are three ways to specify which refs to update on the
remote end.
With '--all' flag, all refs that exist locally are transfered to
-the remote side. You cannot specify any '<head>' if you use
+the remote side. You cannot specify any '<ref>' if you use
this flag.
-Without '--all' and without any '<head>', the refs that exist
+Without '--all' and without any '<ref>', the refs that exist
both on the local side and on the remote side are updated.
-When '<head>'s are specified explicitly, it can be either a
+When '<ref>'s are specified explicitly, it can be either a
single pattern, or a pair of such pattern separated by a colon
':' (this means that a ref name cannot have a colon in it). A
single pattern '<name>' is just a shorthand for '<name>:<name>'.
+
Each pattern pair consists of the source side (before the colon)
-and the destination side (after the colon). The ref that is
+and the destination side (after the colon). The ref to be
pushed is determined by finding a match that matches the source
side, and where it is pushed is determined by using the
destination side.
- - It is an error if <src> does not match exactly one of local
- refs.
+ - It is an error if <src> does not match exactly one of the
+ local refs.
- It is an error if <dst> matches more than one remote refs.
@@ -78,6 +86,17 @@ destination side.
exist in the set of remote refs; the ref matched <src>
locally is used as the name of the destination.
+Without '--force', the <src> ref is stored at the remote only if
+<dst> does not exist, or <dst> is a proper subset (i.e. an
+ancestor) of <src>. This check, known as "fast forward check",
+is performed in order to avoid accidentally overwriting the
+remote ref and lose other peoples' commits from there.
+
+With '--force', the fast forward check is disabled for all refs.
+
+Optionally, a <ref> parameter can be prefixed with a plus '+' sign
+to disable the fast-forward check only on that ref.
+
Author
------
diff --git a/Documentation/git-sh-setup-script.txt b/Documentation/git-sh-setup-script.txt
index 92addd7..5ac613a 100644
--- a/Documentation/git-sh-setup-script.txt
+++ b/Documentation/git-sh-setup-script.txt
@@ -3,26 +3,22 @@ git-sh-setup-script(1)
NAME
----
-git-sh-setup-script - Some git command not yet documented.
-
+git-sh-setup-script - Common git shell script setup code.
SYNOPSIS
--------
-'git-sh-setup-script' [ --option ] <args>...
+'git-sh-setup-script'
DESCRIPTION
-----------
-Does something not yet documented.
-
-OPTIONS
--------
---option::
- Some option not yet documented.
+Sets up the normal git environment variables and a few helper functions
+(currently just "die()"), and returns ok if it all looks like a git archive.
+So use it something like
-<args>...::
- Some argument not yet documented.
+ . git-sh-setup-script || die "Not a git archive"
+to make the rest of the git scripts more careful and readable.
Author
------
diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index fc87146..d1a550c 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -3,26 +3,21 @@ git-stripspace(1)
NAME
----
-git-stripspace - Some git command not yet documented.
+git-stripspace - Fileter out empty lines.
SYNOPSIS
--------
-'git-stripspace' [ --option ] <args>...
+'git-stripspace' < <stream>
DESCRIPTION
-----------
-Does something not yet documented.
-
+Remove multiple empty lines, and empty lines at beginning and end.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+<stream>::
+ Byte stream to act on.
Author
------
diff --git a/Documentation/git-verify-tag-script.txt b/Documentation/git-verify-tag-script.txt
index 88a2646..d5d747c 100644
--- a/Documentation/git-verify-tag-script.txt
+++ b/Documentation/git-verify-tag-script.txt
@@ -3,26 +3,20 @@ git-verify-tag-script(1)
NAME
----
-git-verify-tag-script - Some git command not yet documented.
-
+git-verify-tag-script - Check the GPG signature of tag.
SYNOPSIS
--------
-'git-verify-tag-script' [ --option ] <args>...
+'git-verify-tag-script' <tag>
DESCRIPTION
-----------
-Does something not yet documented.
-
+Validates the gpg signature created by git-tag-script.
OPTIONS
-------
---option::
- Some option not yet documented.
-
-<args>...::
- Some argument not yet documented.
-
+<tag>::
+ SHA1 identifier of a git tag object.
Author
------
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 55d63d9..f63cbdd 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -1,6 +1,6 @@
git(7)
======
-v0.99.4, Aug 2005
+v0.99.5, Aug 2005
NAME
----
@@ -16,11 +16,19 @@ DESCRIPTION
This is reference information for the core git commands.
+Before reading this cover to cover, you may want to take a look
+at the link:tutorial.html[tutorial] document.
+
The Discussion section below contains much useful definition and
clarification info - read that first. And of the commands, I suggest
reading link:git-update-cache.html[git-update-cache] and
link:git-read-tree.html[git-read-tree] first - I wish I had!
+After you get the general feel from the tutorial and this
+overview page, you may want to take a look at the
+link:howto-index.html[howto] documents.
+
+
David Greaves <david@dgreaves.com>
08/05/05
@@ -187,6 +195,18 @@ link:git-update-server-info.html[git-update-server-info]::
Porcelain-ish Commands
----------------------
+link:git-revert-script.html[git-revert-script]::
+ Revert an existing commit.
+
+link:git-rebase-script.html[git-rebase-script]::
+ Rebase local commits to new upstream head.
+
+link:git-add-script.html[git-add-script]::
+ Add paths to the index file.
+
+link:git-branch-script.html[git-branch-script]::
+ Create and Show branches.
+
link:git-whatchanged.html[git-whatchanged]::
Shows commit logs and differences they introduce.
@@ -205,7 +225,16 @@ link:git-fetch-script.html[git-fetch-script]::
link:git-pull-script.html[git-pull-script]::
Fetch from and merge with a remote repository.
-ulink:git-commit-script.html[git-commit-script]::
+link:git-resolve-script.html[git-resolve-script]::
+ Merge two commits.
+
+link:git-octopus-script.html[git-octopus-script]::
+ Merge more than two commits.
+
+link:git-push-script.html[git-push-script]::
+ Update remote refs along with associated objects.
+
+link:git-commit-script.html[git-commit-script]::
Record changes to the repository.
link:git-show-branch.html[git-show-branch]::
@@ -220,11 +249,17 @@ link:git-rename-script.html[git-rename]::
link:git-ls-remote-script.html[git-ls-remote-script]::
Shows references in a remote or local repository.
+link:git-verify-tag-script.html[git-verify-tag-script]::
+ Check the GPG signature of tag.
+
Ancillary Commands
------------------
Manipulators:
+link:git-relink-script.html[git-relink-script]::
+ Hardlink common objects in local repositories.
+
link:git-apply-patch-script.html[git-apply-patch-script]::
Sample script to apply the diffs from git-diff-*
@@ -237,9 +272,6 @@ link:git-merge-one-file-script.html[git-merge-one-file-script]::
link:git-prune-script.html[git-prune-script]::
Prunes all unreachable objects from the object database
-link:git-resolve-script.html[git-resolve-script]::
- Script used to merge two trees
-
link:git-tag-script.html[git-tag-script]::
An example script to create a tag object signed with GPG
@@ -249,6 +281,15 @@ link:git-cvsimport-script.html[git-cvsimport-script]::
Interrogators:
+link:git-patch-id.html[git-patch-id]::
+ Compute unique ID for a patch.
+
+link:git-count-objects-script.html[git-count-objects-script]::
+ Count unpacked number of objects and their disk consumption.
+
+link:git-cherry.html[git-cherry]::
+ Find commits not merged upstream.
+
link:git-diff-helper.html[git-diff-helper]::
Generates patch format output for git-diff-*
@@ -258,6 +299,9 @@ link:git-ssh-push.html[git-ssh-push]::
link:git-send-email-script.html[git-send-email]::
Send patch e-mails out of "format-patch --mbox" output.
+link:git-sh-setup-script.html[git-sh-setup-script]::
+ Common git shell script setup code.
+
Commands not yet documented
---------------------------
@@ -274,30 +318,18 @@ link:git-mailinfo.html[git-mailinfo]::
link:git-mailsplit.html[git-mailsplit]::
git-mailsplit.
-link:git-add-script.html[git-add-script]::
- git-add-script.
-
link:git-bisect-script.html[git-bisect-script]::
git-bisect-script.
-link:git-branch-script.html[git-branch-script]::
- git-branch-script.
-
link:git-build-rev-cache.html[git-build-rev-cache]::
git-build-rev-cache.
link:git-checkout-script.html[git-checkout-script]::
git-checkout-script.
-link:git-cherry.html[git-cherry]::
- git-cherry.
-
link:git-clone-dumb-http.html[git-clone-dumb-http]::
git-clone-dumb-http.
-link:git-count-objects-script.html[git-count-objects-script]::
- git-count-objects-script.
-
link:git-daemon.html[git-daemon]::
git-daemon.
@@ -310,18 +342,6 @@ link:git-format-patch-script.html[git-format-patch-script]::
link:git-get-tar-commit-id.html[git-get-tar-commit-id]::
git-get-tar-commit-id.
-link:git-patch-id.html[git-patch-id]::
- git-patch-id.
-
-link:git-push-script.html[git-push-script]::
- git-push-script.
-
-link:git-rebase-script.html[git-rebase-script]::
- git-rebase-script.
-
-link:git-relink-script.html[git-relink-script]::
- git-relink-script.
-
link:git-request-pull-script.html[git-request-pull-script]::
git-request-pull-script.
@@ -331,21 +351,12 @@ link:git-reset-script.html[git-reset-script]::
link:git-rev-parse.html[git-rev-parse]::
git-rev-parse.
-link:git-revert-script.html[git-revert-script]::
- git-revert-script.
-
-link:git-sh-setup-script.html[git-sh-setup-script]::
- git-sh-setup-script.
-
link:git-show-rev-cache.html[git-show-rev-cache]::
git-show-rev-cache.
link:git-stripspace.html[git-stripspace]::
git-stripspace.
-link:git-verify-tag-script.html[git-verify-tag-script]::
- git-verify-tag-script.
-
link:gitk.html[gitk]::
gitk.
diff --git a/Documentation/glossary.txt b/Documentation/glossary.txt
index 7456cff..a069b7b 100644
--- a/Documentation/glossary.txt
+++ b/Documentation/glossary.txt
@@ -27,14 +27,20 @@ blob object::
tree object::
An object containing a list of file names and modes along with refs
- to the associated blob and/or tree objects. A tree object is
- equivalent to a directory.
+ to the associated blob and/or tree objects. A tree is equivalent
+ to a directory.
tree::
Either a working tree, or a tree object together with the
dependent blob and tree objects (i.e. a stored representation
of a working tree).
+DAG::
+ Directed acyclic graph. The commit objects form a directed acyclic
+ graph, because they have parents (directed), and the graph of commit
+ objects is acyclic (there is no chain which begins and ends with the
+ same object).
+
index::
A collection of files with stat information, whose contents are
stored as objects. The cache is a stored version of your working
@@ -142,6 +148,10 @@ merge::
merge uses heuristics to accomplish that. Evidently, an automatic
merge can fail.
+octopus::
+ To merge more than two branches. Also denotes an intelligent
+ predator.
+
resolve::
The action of fixing up manually what a failed automatic merge
left behind.
diff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh
new file mode 100755
index 0000000..f9d3e57
--- /dev/null
+++ b/Documentation/howto-index.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+cat <<\EOF
+GIT Howto Index
+===============
+
+Here is a collection of mailing list postings made by various
+people describing how they use git in their workflow.
+
+EOF
+
+for txt
+do
+ title=`expr "$txt" : '.*/\(.*\)\.txt$'`
+ from=`sed -ne '
+ /^$/q
+ /^From:[ ]/{
+ s///
+ s/^[ ]*//
+ s/[ ]*$//
+ s/^/by /
+ p
+ }
+ ' "$txt"`
+
+ abstract=`sed -ne '
+ /^Abstract:[ ]/{
+ s/^[^ ]*//
+ x
+ s/.*//
+ x
+ : again
+ /^[ ]/{
+ s/^[ ]*//
+ H
+ n
+ b again
+ }
+ x
+ p
+ q
+ }' "$txt"`
+
+ echo "* link:$txt[$title] $from
+$abstract
+
+"
+
+done
diff --git a/Documentation/howto/make-dist.txt b/Documentation/howto/make-dist.txt
index ae90941..132d5ec 100644
--- a/Documentation/howto/make-dist.txt
+++ b/Documentation/howto/make-dist.txt
@@ -3,6 +3,11 @@ From: Linus Torvalds <torvalds@osdl.org>
To: Dave Jones <davej@redhat.com>
cc: git@vger.kernel.org
Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
+Abstract: In this article, Linus talks about building a tarball,
+ incremental patch, and ChangeLog, given a base release and two
+ rc releases, following the convention of giving the patch from
+ the base release and the latest rc, with ChangeLog between the
+ last rc and the latest rc.
On Sat, 13 Aug 2005, Dave Jones wrote:
>
diff --git a/Documentation/howto/rebase-and-edit.txt b/Documentation/howto/rebase-and-edit.txt
index 8299ca5..6cc1c79 100644
--- a/Documentation/howto/rebase-and-edit.txt
+++ b/Documentation/howto/rebase-and-edit.txt
@@ -3,6 +3,9 @@ From: Linus Torvalds <torvalds@osdl.org>
To: Steve French <smfrench@austin.rr.com>
cc: git@vger.kernel.org
Subject: Re: sending changesets from the middle of a git tree
+Abstract: In this article, Linus demonstrates how a broken commit
+ in a sequence of commits can be removed by rewinding the head and
+ reapplying selected changes.
On Sat, 13 Aug 2005, Linus Torvalds wrote:
diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt
index 8109b7f..f627e42 100644
--- a/Documentation/howto/rebase-from-internal-branch.txt
+++ b/Documentation/howto/rebase-from-internal-branch.txt
@@ -3,6 +3,11 @@ To: git@vger.kernel.org
Cc: Petr Baudis <pasky@suse.cz>, Linus Torvalds <torvalds@osdl.org>
Subject: Re: sending changesets from the middle of a git tree
Date: Sun, 14 Aug 2005 18:37:39 -0700
+Abstract: In this article, JC talks about how he rebases the
+ public "pu" branch using the core GIT tools when he updates
+ the "master" branch, and how "rebase" works. Also discussed
+ is how this applies to individual developers who sends patches
+ upstream.
Petr Baudis <pasky@suse.cz> writes:
diff --git a/Documentation/howto/rebuild-from-update-hook.txt b/Documentation/howto/rebuild-from-update-hook.txt
new file mode 100644
index 0000000..ebd025d
--- /dev/null
+++ b/Documentation/howto/rebuild-from-update-hook.txt
@@ -0,0 +1,83 @@
+Subject: [HOWTO] Using post-update hook
+Message-ID: <7vy86o6usx.fsf@assigned-by-dhcp.cox.net>
+From: Junio C Hamano <junkio@cox.net>
+Date: Fri, 26 Aug 2005 18:19:10 -0700
+Abstract: In this how-to article, JC talks about how he
+ uses the post-update hook to automate git documentation page
+ shown at http://www.kernel.org/pub/software/scm/git/docs/.
+
+The pages under http://www.kernel.org/pub/software/scm/git/docs/
+are built from Documentation/ directory of the git.git project
+and needed to be kept up-to-date. The www.kernel.org/ servers
+are mirrored and I was told that the origin of the mirror is on
+the machine master.kernel.org, on which I was given an account
+when I took over git maintainership from Linus.
+
+The directories relevant to this how-to are these two:
+
+ /pub/scm/git/git.git/ The public git repository.
+ /pub/software/scm/git/docs/ The HTML documentation page.
+
+So I made a repository to generate the documentation under my
+home directory over there.
+
+ $ cd
+ $ mkdir doc-git && cd doc-git
+ $ git clone /pub/scm/git/git.git/ docgen
+
+What needs to happen is to update the $HOME/doc-git/docgen/
+working tree, build HTML docs there and install the result in
+/pub/software/scm/git/docs/ directory. So I wrote a little
+script:
+
+ $ cat >dododoc.sh <<\EOF
+ #!/bin/sh
+ cd $HOME/doc-git/docgen || exit
+
+ unset GIT_DIR
+
+ git pull /pub/scm/git/git.git/ master &&
+ cd Documentation &&
+ make install-webdoc
+ EOF
+
+Initially I used to run this by hand whenever I push into the
+public git repository. Then I did a cron job that ran twice a
+day. The current round uses the post-update hook mechanism,
+like this:
+
+ $ cat >/pub/scm/git/git.git/hooks/post-update <<\EOF
+ #!/bin/sh
+ #
+ # An example hook script to prepare a packed repository for use over
+ # dumb transports.
+ #
+ # To enable this hook, make this file executable by "chmod +x post-update".
+
+ case " $* " in
+ *' refs/heads/master '*)
+ echo $HOME/doc-git/dododoc.sh | at now
+ ;;
+ esac
+ exec git-update-server-info
+ EOF
+ $ chmod +x /pub/scm/git/git.git/hooks/post-update
+
+There are three things worth mentioning:
+
+ - The update-hook is run after the repository accepts a "git
+ push", under my user privilege. It is given the full names
+ of refs that have been updated as arguments. My post-update
+ runs the dododoc.sh script only when the master head is
+ updated.
+
+ - When update-hook is run, GIT_DIR is set to '.' by the calling
+ receive-pack. This is inherited by the dododoc.sh run via
+ the "at" command, and needs to be unset; otherwise, "git
+ pull" it does into $HOME/doc-git/docgen/ repository would not
+ work correctly.
+
+ - This is still crude and does not protect against simultaneous
+ make invocations stomping on each other. I would need to add
+ some locking mechanism for this.
+
diff --git a/Documentation/howto/using-topic-branches.txt b/Documentation/howto/using-topic-branches.txt
index 52fa4c0..b3b4d2c 100644
--- a/Documentation/howto/using-topic-branches.txt
+++ b/Documentation/howto/using-topic-branches.txt
@@ -1,16 +1,16 @@
Date: Mon, 15 Aug 2005 12:17:41 -0700
From: tony.luck@intel.com
Subject: Some tutorial text (was git/cogito workshop/bof at linuxconf au?)
+Abstract: In this article, Tony Luck discusses how he uses GIT
+ as a Linux subsystem maintainer.
Here's something that I've been putting together on how I'm using
GIT as a Linux subsystem maintainer.
-I suspect that I'm a bit slap-happy with the "git checkout" commands in
-the examples below, and perhaps missing some of the _true-git_ ways of
-doing things.
-
-Tony
+Last updated w.r.t. GIT 0.99.5
+
Linux subsystem maintenance using GIT
-------------------------------------
@@ -48,24 +48,38 @@ Change directory into the cloned tree you just created
$ cd work
-Make a GIT branch named "linus", and rename the "origin" branch as linus too:
+Set up a remotes file so that you can fetch the latest from Linus' master
+branch into a local branch named "linus":
+
+ $ cat > .git/remotes/linus
+ URL: rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ Pull: master:linus
+ ^D
- $ git checkout -b linus
- $ mv .git/branches/origin .git/branches/linus
+and create the linus branch:
+
+ $ git branch linus
The "linus" branch will be used to track the upstream kernel. To update it,
you simply run:
- $ git checkout linus && git pull linus
+ $ git fetch linus
+
+you can do this frequently (and it should be safe to do so with pending
+work in your tree, but perhaps not if you are in mid-merge).
-you can do this frequently (as long as you don't have any uncommited work
-in your tree).
+If you need to keep track of other public trees, you can add remote branches
+for them too:
-If you need to keep track of other public trees, you can add branches for
-them too:
+ $ git branch another
+ $ cat > .git/remotes/another
+ URL: ... insert URL here ...
+ Pull: name-of-branch-in-this-remote-tree:another
+ ^D
- $ git checkout -b another linus
- $ echo URL-for-another-public-tree > .git/branches/another
+and run:
+
+ $ git fetch another
Now create the branches in which you are going to work, these start
out at the current tip of the linus branch.
@@ -78,15 +92,25 @@ These can be easily kept up to date by merging from the "linus" branch:
$ git checkout test && git resolve test linus "Auto-update from upstream"
$ git checkout release && git resolve release linus "Auto-update from upstream"
-Set up so that you can push upstream to your public tree:
+Set up so that you can push upstream to your public tree (you need to
+log-in to the remote system and create an empty tree there before the
+first push).
- $ echo master.kernel.org:/ftp/pub/scm/linux/kernel/git/aegl/linux-2.6.git > .git/branches/origin
+ $ cat > .git/remotes/mytree
+ URL: master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
+ Push: release
+ Push: test
+ ^D
-and then push each of the test and release branches using:
+and the push both the test and release trees using:
- $ git push origin test
-and
- $ git push origin release
+ $ git push mytree
+
+or push just one of the test and release branches using:
+
+ $ git push mytree test
+or
+ $ git push mytree release
Now to apply some patches from the community. Think of a short
snappy name for a branch to hold this patch (or related group of
@@ -169,9 +193,9 @@ test|release)
git checkout $1 && git resolve $1 linus "Auto-update from upstream"
;;
linus)
- before=$(cat .git/HEAD)
- git checkout linus && git pull linus
- after=$(cat .git/HEAD)
+ before=$(cat .git/refs/heads/linus)
+ git fetch linus
+ after=$(cat .git/refs/heads/linus)
if [ $before != $after ]
then
git-whatchanged $after ^$before | git-shortlog
diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh
new file mode 100755
index 0000000..1f534f1
--- /dev/null
+++ b/Documentation/install-webdoc.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+T="$1"
+
+for h in *.html howto/*.txt
+do
+ diff -u "$T/$h" "$h" || {
+ echo >&2 "# install $h $T/$h"
+ rm -f "$T/$h"
+ mkdir -p `dirname "$T/$h"`
+ cp "$h" "$T/$h"
+ }
+done
+strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
+for th in "$T"/*.html "$T"/howto/*.txt
+do
+ h=`expr "$th" : "$strip_leading"'\(.*\)'`
+ case "$h" in
+ index.html) continue ;;
+ esac
+ test -f "$h" && continue
+ echo >&2 "# rm -f $th"
+ rm -f "$th"
+done
+ln -sf git.html "$T/index.html"
diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index 7ae4ba0..8f6b68c 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -16,21 +16,67 @@
Local directory
/path/to/repo.git/
- In addition to that, as a short-hand, the name of a file
- in $GIT_DIR/branches directory can be specified; the
- named file should contain a single line, a URL in one of
- the above formats, optionally followed by a hash '#' and
- the name of remote head.
-
-<head>::
- The remote head name to fetch from. That is, make the
- objects reachable from the commit recorded in
- $GIT_DIR/refs/heads/<head> in the remote repository
- available locally.
-
-tag <tag>::
- The remote head tag to fetch from. That is, make the
- objects reachable from the commit recorded in
- $GIT_DIR/refs/tags/<tag> in the remote repository
- available locally.
+ In addition to the above, as a short-hand, the name of a
+ file in $GIT_DIR/remotes directory can be given; the
+ named file should be in the following format:
+ URL: one of the above URL format
+ Push: <refspec>...
+ Pull: <refspec>...
+
+ When such a short-hand is specified in place of
+ <repository> without <refspec> parameters on the command
+ line, <refspec>... specified on Push lines or Pull lines
+ are used for "git push" and "git fetch/pull",
+ respectively.
+
+ The name of a file in $GIT_DIR/branches directory can be
+ specified as an older notation short-hand; the named
+ file should contain a single line, a URL in one of the
+ above formats, optionally followed by a hash '#' and the
+ name of remote head (URL fragment notation).
+ $GIT_DIR/branches/<remote> file that stores a <url>
+ without the fragment is equivalent to have this in the
+ corresponding file in the $GIT_DIR/remotes/ directory
+
+ URL: <url>
+ Pull: refs/heads/master:<remote>
+
+ while having <url>#<head> is equivalent to
+
+ URL: <url>
+ Pull: refs/heads/<head>:<remote>
+
+<refspec>::
+ The canonical format of a <refspec> parameter is
+ '+?<src>:<dst>'; that is, an optional plus '+', followed
+ by the source ref, followed by a colon ':', followed by
+ the destination ref.
+
+ When used in "git push", the <src> side can be an
+ arbitrary "SHA1 expression" that can be used as an
+ argument to "git-cat-file -t". E.g. "master~4" (push
+ four parents before the current master head).
+
+ For "git push", the local ref that matches <src> is used
+ to fast forward the remote ref that matches <dst>. If
+ the optional plus '+' is used, the remote ref is updated
+ even if it does not result in a fast forward update.
+
+ For "git fetch/pull", the remote ref that matches <src>
+ is fetched, and if <dst> is not empty string, the local
+ ref that matches it is fast forwarded using <src>.
+ Again, if the optional plus '+' is used, the local ref
+ is updated even if it does not result in a fast forward
+ update.
+
+ Some short-cut notations are also supported.
+
+ * For backward compatibility, "tag" is almost ignored;
+ it just makes the following parameter <tag> to mean a
+ refspec "refs/tags/<tag>:refs/tags/<tag>".
+
+ * A parameter <ref> without a colon is equivalent to
+ <ref>: when pulling/fetching, and <ref>:<ref> when
+ pushing. That is, do not store it locally if
+ fetching, and update the same name if pushing.
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index 876a4af..866dbbe 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -671,6 +671,7 @@ you have, you can say
git branch
which is nothing more than a simple script around "ls .git/refs/heads".
+There will be asterisk in front of the branch you are currently on.
Sometimes you may wish to create a new branch _without_ actually
checking it out and switching to it. If so, just use the command
@@ -892,18 +893,26 @@ pull from:
It is likely that you will be pulling from the same remote
repository from time to time. As a short hand, you can store
-the remote repository URL in a file under .git/branches/
+the remote repository URL in a file under .git/remotes/
directory, like this:
- mkdir -p .git/branches
- echo rsync://kernel.org/pub/scm/git/git.git/ \
- >.git/branches/linus
+------------------------------------------------
+mkdir -p .git/remotes/
+cat >.git/remotes/linus <<\EOF
+URL: http://www.kernel.org/pub/scm/git/git.git/
+EOF
+------------------------------------------------
and use the filename to "git pull" instead of the full URL.
-The contents of a file under .git/branches can even be a prefix
+The URL specified in such file can even be a prefix
of a full URL, like this:
- echo rsync://kernel.org/pub/.../jgarzik/ >.git/branches/jgarzik
+------------------------------------------------
+cat >.git/remotes/jgarzik <<\EOF
+URL: http://www.kernel.org/pub/scm/linux/git/jgarzik/
+EOF
+------------------------------------------------
+
Examples.
@@ -913,9 +922,9 @@ Examples.
the above are equivalent to:
- (1) git pull rsync://kernel.org/pub/scm/git/git.git/ HEAD
- (2) git pull rsync://kernel.org/pub/scm/git/git.git/ tag v0.99.1
- (3) git pull rsync://kernel.org/pub/.../jgarzik/netdev-2.6.git e100
+ (1) git pull http://www.kernel.org/pub/scm/git/git.git/ HEAD
+ (2) git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1
+ (3) git pull http://www.kernel.org/pub/.../jgarzik/netdev-2.6.git e100
Publishing your work
@@ -1169,18 +1178,43 @@ Working with Others, Shared Repository Style
If you are coming from CVS background, the style of cooperation
suggested in the previous section may be new to you. You do not
have to worry. git supports "shared public repository" style of
-cooperation you are more familiar with as well.
-
-For this, you should set up a public repository on a machine
-that are reachable via SSH by people with "commit privileges".
-Put them in the same user group and make the repository writable
-by that group. Then, each committer would first merge with the
-head of the branch of choice, and run "git push" to update the
-branch at the public repository. "git push" refuses to update
-if the reference on the remote side is not an ancestor of the
-commit you are pushing, to prevent you from overwriting changes
-made by somebody else.
+cooperation you are probably more familiar with as well.
+
+For this, set up a public repository on a machine that is
+reachable via SSH by people with "commit privileges". Put the
+committers in the same user group and make the repository
+writable by that group.
+
+Each committer would then:
+
+ - clone the shared repository to a local repository,
+
+------------------------------------------------
+$ git clone repo.shared.xz:/pub/scm/project.git/ my-project
+$ cd my-project
+$ hack away
+------------------------------------------------
+
+ - merge the work others might have done while you were
+ hacking away.
+
+------------------------------------------------
+$ git pull origin
+$ test the merge result
+------------------------------------------------
+
+ - push your work as the new head of the shared
+ repository.
+
+------------------------------------------------
+$ git push origin master
+------------------------------------------------
+If somebody else pushed into the same shared repository while
+you were working locally, the last step "git push" would
+complain, telling you that the remote "master" head does not
+fast forward. You need to pull and merge those other changes
+back before you push your work when it happens.
[ to be continued.. cvsimports ]