[med-svn] r9553 - trunk/community/website/docs
Alex Mestiashvili
malex-guest at alioth.debian.org
Thu Feb 2 17:49:57 UTC 2012
Author: malex-guest
Date: 2012-02-02 17:49:57 +0000 (Thu, 02 Feb 2012)
New Revision: 9553
Modified:
trunk/community/website/docs/policy.xml
Log:
Changed "Git tips" secion layout to make it easier for a newbie.
Modified: trunk/community/website/docs/policy.xml
===================================================================
--- trunk/community/website/docs/policy.xml 2012-02-02 16:48:21 UTC (rev 9552)
+++ trunk/community/website/docs/policy.xml 2012-02-02 17:49:57 UTC (rev 9553)
@@ -326,41 +326,39 @@
<title>Git tips</title>
<formalpara id="new-repository-with-gbp">
<title>To create a new local git repository</title>
+ <literallayout>When the upstream sources are distributed as compressed <command>tar</command> archives (<literal>tar.gz</literal>, …):</literallayout>
<para>
- When the upstream sources are distributed as compressed <command>tar</command> archives
- (<literal>tar.gz</literal>, …):<programlisting>
+<programlisting>
<command>mkdir</command> <filename class="directory">package</filename>
<command>cd</command> <filename class="directory">package</filename>
<command>git init</command>
<command>git import-orig</command> <option>--pristine-tar</option> <filename>/path/to/package_version.orig.tar.gz</filename>
<command>dh_make</command> <option>-p package_x.y.z</option></programlisting>
- The above steps will create a repository with the appropriate layout for
- <command>git-buildpackage</command>, with three branches:
+ </para>
+ <literallayout> The above steps will create a repository with the appropriate layout for <command>git-buildpackage</command>, with three branches:
<literal>master</literal> (where the Debian development will happen),
- <literal>pristine-tar</literal> used by the
- <literal>pristine-tar</literal> tool during the package build process to
- recreate the original tarball, and <literal>upstream</literal>, which
- will contain the upstream source.
- </para>
+ <literal>pristine-tar</literal> used by the <literal>pristine-tar</literal> tool during the package build process to recreate the original tarball,
+ and <literal>upstream</literal>, which will contain the upstream source.
+ </literallayout>
</formalpara>
<formalpara id="debcheckout-sets-git-options">
- <title>Configure Git to commit using your packager name and address</title>
- <para>The <option>--global</option> option is to say Git these
- are the default parameters for every Git repository you commit to,
- without it the settings will be per-repository only:<programlisting>
+ <title><literallayout>Configure Git to commit using your packager name and address.</literallayout></title>
+ <para>The <option>--global</option> option is to say Git these are the default parameters for every Git repository you commit to,
+ without it the settings will be per-repository only:</para>
+ <para>
+<programlisting>
<command>git config</command> <option><optional>--global</optional></option> <option>user.name "$DEBFULLNAME"</option>
<command>git config</command> <option><optional>--global</optional></option> <option>user.email "$DEBEMAIL"</option></programlisting>
</para>
</formalpara>
<formalpara id="debcheckout-git-track">
- <title>To clone and follow every branch of a git repository</title>
+ <title><literallayout>To clone and follow every branch of a git repository.</literallayout></title>
<para>When the package is already in the Debian archive, you can use the
<command>debcheckout</command> command with its
- <command><option>--git-track='*'</option></command> option. To restrict
- the tracked branch to the standard ones used by
- <command>git-buildpackage</command>, <literal>master upstream
- pristine-tar</literal> can be passed instead of the wildcard.
+ <command><option>--git-track='*'</option></command> option.
</para>
+ <para> To restrict the tracked branch to the standard ones used by <command>git-buildpackage</command>, <literal>master upstream
+ pristine-tar</literal> can be passed instead of the wildcard.</para>
</formalpara>
<formalpara id="git-track-new-branches">
<title>Example commands to track new branches</title>
@@ -377,35 +375,42 @@
<varname>user.name</varname> accordingly.
</para>
</formalpara>
- <formalpara id="git-add-alioth-branch">
- <title>To push changes to Alioth</title>
- <para>A remote branch needs to be configured. This
- is done automatically after cloning a repository, for instance with
+ <formalpara id="create-git-repository-on-alioth">
+ <title>Pushing to git.debian.org, creating a new bare repository on Alitoh.</title>
+ <literallayout>Before pushing to git.debian.org for the first time, an empty repository needs to be created there.</literallayout>
+ <para>To do this connect to <literal>git.debian.org</literal>, enter the<filename class="directory">/git/debian-med</filename>
+ directory, and run the<code><command> ./setup-repository</command></code> script.</para>
+ <para id="example-create-bare-git-repository-on-alioth">
+ <literallayout>Run it similar to:</literallayout>
+<programlisting>
+<command>ssh</command> git.debian.org
+<command>cd</command> /git/debian-med
+<command>./setup-repository</command> pkg 'Packaging of pkg in Debian'
+</programlisting>
+ </para>
+ <literallayout>This will create an empty, bare, shared Git repository and setup some hooks. Each package is kept in its own Git repository.</literallayout>
+ <literallayout>Now, on your local machine add the alioth repository as a remote:</literallayout>
+<para>
+<programlisting>
+<command>git remote add</command> <literal>origin</literal> <filename class="directory">git+ssh://git.debian.org/git/debian-med/package.git</filename>
+</programlisting>
+</para>
+ <para>This is done automatically after cloning a repository, for instance with
<link linkend="debcheckout-git-track">debcheckout</link>. The default
- remote branch is called <quote>origin</quote>. Here are example
- commands to set up Alioth as a remote branch on a freshly created
- repository:<programlisting>
-<command>git remote add</command> <literal>origin</literal> <filename class="directory">git+ssh://git.debian.org/git/debian-med/package.git</filename></programlisting>
- </para>
+ remote branch is called <quote>origin</quote>.
+ </para>
</formalpara>
- <formalpara id="create-git-repository-on-alioth">
- <title>To create a new empty bare repository on Alioth, where to push changes</title>
- <para>Connect to <literal>git.debian.org</literal>, enter the
- <filename class="directory">/git/debian-med</filename> directory,
- and run <code><command>./setup-repository</command>
- <option>packagename</option> <option>"Description of the
- package"</option></code>. It will create a <filename
- class="directory">packagename.git</filename> repository on with the
- proper hooks set up for our team.
- </para>
- </formalpara>
<formalpara id="push-package-to-alioth">
- <title>To push the package</title>
+ <title><literallayout>To push the package.</literallayout></title>
<para>(make sure you've added the alioth remote!), do the
following: <code><command>git push</command> <option>origin
master</option></code>. For the first push, it's necessary to specify
<option>origin master</option>. The next time you will push, a
<command>git push</command> will suffice.
+ <literallayout> Or use the <literal>--set-upstream</literal> option, helps future use of git pull.</literallayout>
+<programlisting>
+<command>git</command> push --set-upstream
+</programlisting>
</para>
</formalpara>
<formalpara id="git-push-all-tags">
@@ -413,6 +418,10 @@
<para>Be sure to also do a run <command>git push</command> with
<option>--all</option>, and one with <option>--tags</option> if you
created new tags.
+<programlisting>
+<command>git</command> push --all --set-upstream
+<command>git</command> push --tags
+</programlisting>
</para>
</formalpara>
<formalpara id="git-tag-release">
@@ -431,7 +440,7 @@
</para>
</formalpara>
<formalpara id="git-debian-version-from-commit">
- <title>If upstream manages his sources with Git</title>
+ <title><literallayout>If upstream manages his sources with Git.</literallayout></title>
<para>
The following makefile script can help producing a version number when
no Git tag is available:<programlisting>
@@ -448,8 +457,7 @@
</para>
</formalpara>
<formalpara id="git-pbuilder">
- <title>To make <command>git-buildpackage</command> build the package with
- <command>pdebuild</command></title>
+ <title><literallayout>To make <command>git-buildpackage</command> build the package with <command>pdebuild</command>.</literallayout></title>
<para>
Add the following to the configuration file
<filename>~/.gbp.conf</filename> or
More information about the debian-med-commit
mailing list