From cb6d17227b43e5b7d07398eff8908e9838b24766 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 12 Jan 2009 21:42:59 +0800 Subject: [PATCH] Finish my work on CG 1. --- Documentation/devel/git-starting.itexi | 99 ++++++++++++++++---------- 1 file changed, 62 insertions(+), 37 deletions(-) diff --git a/Documentation/devel/git-starting.itexi b/Documentation/devel/git-starting.itexi index 6702bef1f9..f587c5ecbb 100644 --- a/Documentation/devel/git-starting.itexi +++ b/Documentation/devel/git-starting.itexi @@ -7,7 +7,6 @@ * Updating the source code:: * Sharing your changes:: * Other interesting Git commands:: -* Applying git patches:: * Git on Windows:: @end menu @@ -15,13 +14,8 @@ @node Getting the source code @section Getting the source code -The source code is kept in a git respository. - -@warning{These instructions assume that you are using the -command-line version of git 1.5 or higher.} - - @menu +* Git introduction:: * Main source code:: * Website source code:: * Documentation translations source code:: @@ -30,6 +24,18 @@ command-line version of git 1.5 or higher.} * Git user configuration:: @end menu +@node Git introduction +@subsection Git introduction + +The source code is kept in a git respository. This allows us to +track changes to files, and for multiple people to work on the +same set of files (generally) without any problems. + +@warning{These instructions assume that you are using the +command-line version of git 1.5 or higher. Windows users should +skip to @ref{Git on Windows}.} + + @node Main source code @subsection Main source code @@ -50,8 +56,10 @@ git checkout -b master origin/master To get the website (including translations), +FIXME: test this!!! + @example -mkdir lilyweb ; cd lilyweb +mkdir lilypod-web ; cd lilypond-web git init-db git remote add -f -t web -m web origin git://git.sv.gnu.org/lilypond.git/ git checkout -b web origin/web @@ -63,10 +71,10 @@ git checkout -b web origin/web To translate the documentation (@emph{not} the website), -FIXME: change +FIXME: change!!! @example -mkdir lilytranslate ; cd lilytranslate +mkdir lilypond-translate; cd lilypond-translate git init-db git remote add -f -t web -m web origin git://git.sv.gnu.org/lilypond.git/ git checkout -b web origin/web @@ -83,10 +91,11 @@ you wish to do so, you will need more familiarity with git. @item @code{gub}: This stores the Grand Unified Binary, our cross-platform building -tool. +tool. For more info, see @uref{http://lilypond.org/gub}. The git +location is: @example -FIXME: insert new gub addy +http://github.com/janneke/gub @end example @item @code{dev/XYZ}: @@ -135,6 +144,7 @@ git config --global user.email myemail@@example.net * Technical notes:: @end menu + @node Importance of updating @subsection Importance of updating @@ -145,6 +155,7 @@ there are generally no problems with this multiple-person editing. However, serious problems can arise if you do not pull before attempting commit. + @node Update command @subsection Updating command @@ -156,6 +167,7 @@ the remote @code{git.sv.gnu.org} repository: git pull origin @end example + @node Resolving conflicts @subsection Resolving conflicts @@ -173,35 +185,39 @@ TODO @node Technical notes @subsection Technical notes -Let's explain a bit of Git vocabulary. The @code{git pull -origin} command is just a shortcut for this command: +TODO: I'm not going to bother with this section. -gp + +Let's explain a bit of Git vocabulary. The @code{git pull origin} +command is just a shortcut for this command: @example git pull git://git.sv.gnu.org/lilypond.git/ MY-BRANCH:origin/MY-BRANCH @end example -A commit is a set of changes made to the sources; it also includes the -committish of the parent commit, the name and e-mail of the author -(the person who wrote the changes), the name and e-mail of the -committer (the person who brings these changes into the git +A commit is a set of changes made to the sources; it also includes +the committish of the parent commit, the name and e-mail of the +author (the person who wrote the changes), the name and e-mail of +the committer (the person who brings these changes into the git repository), and a commit message. A committish is the SHA1 checksum of a commit, a number made of 40 -hexadecimal digits, which acts as the internal unique identifier for -this commit. To refer to a particular revision, don't use vague -references like the (approximative) date, simply copy'n'paste the -committish. - -A branch is a tree (in the mathematical or computer science sense) of -commits, and the topmost commit of this branch is called a head. - -The "git fetch" command above has created a branch called origin/web -in your local Git repository. As this branch is a copy of the remote -branch web from git.sv.gnu.org LilyPond repository, it is -called a `remote branch', and is meant to track the changes on the -branch from git.sv.gnu.org: it will be updated every time you run 'git -pull' or 'git fetch' with this branch reference as argument, e.g. -by using .git/remotes/web remote file when running 'git fetch web'. +hexadecimal digits, which acts as the internal unique identifier +for this commit. To refer to a particular revision, don't use +vague references like the (approximative) date, simply +copy'n'paste the committish. + +A branch is a tree (in the mathematical or computer science sense) +of commits, and the topmost commit of this branch is called a +head. + +The "git fetch" command above has created a branch called +@code{origin/web} in your local Git repository. As this branch is +a copy of the remote branch web from git.sv.gnu.org LilyPond +repository, it is called a `remote branch', and is meant to track +the changes on the branch from git.sv.gnu.org: it will be updated +every time you run 'git pull' or 'git fetch' with this branch +reference as argument, e.g. by using .git/remotes/web remote file +when running 'git fetch web'. The 'git checkout' command above has created a branch named 'web'. At the beginning, this branch is identical to 'origin/web', but it will @@ -227,16 +243,15 @@ Manual at - @node Sharing your changes @section Sharing your changes - @menu * Producing a patch:: * Committing directly:: @end menu + @node Producing a patch @subsection Producing a patch @@ -260,7 +275,8 @@ Most contributors do not have permission to commit directly. If you do, edit @file{.git/config} to contain @example -FIXME? +FIXME? Is anything needed, or did the previous commands set it +up? @end example You may then @code{git push}. @@ -269,6 +285,15 @@ You may then @code{git push}. @node Other interesting Git commands @section Other interesting Git commands +@menu +* Git log:: +* Applying git patches:: +@end menu + + +@node Git log +@subsection Git log + The commands above don't only bring you the latest version of the sources, but also the full history of revisions (revisons, also called commits, are changes made to the sources), stored in the @@ -282,7 +307,7 @@ gitk # shows history graphically @node Applying git patches -@section Applying git patches +@subsection Applying git patches Well-formed git patches should be committed with -- 2.39.2