diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/.gitignore | 5 | ||||
-rw-r--r-- | Documentation/Makefile | 18 | ||||
-rw-r--r-- | Documentation/git.txt | 5 | ||||
-rw-r--r-- | Documentation/glossary.txt | 14 | ||||
-rwxr-xr-x | Documentation/howto-index.sh | 49 | ||||
-rw-r--r-- | Documentation/howto/make-dist.txt | 5 | ||||
-rw-r--r-- | Documentation/howto/rebase-and-edit.txt | 3 | ||||
-rw-r--r-- | Documentation/howto/rebase-from-internal-branch.txt | 5 | ||||
-rw-r--r-- | Documentation/howto/using-topic-branches.txt | 70 | ||||
-rwxr-xr-x | Documentation/install-webdoc.sh | 25 |
10 files changed, 172 insertions, 27 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/git.txt b/Documentation/git.txt index 664b88a..d4ede09 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -24,6 +24,11 @@ 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 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/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" |