mirror of https://github.com/tLDP/LDP
Start cutting documentation over to using git
This commit is contained in:
parent
6f4bf9c851
commit
913fb57e48
|
@ -0,0 +1,91 @@
|
|||
<!--
|
||||
<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'>
|
||||
-->
|
||||
<appendix id="git">
|
||||
<title>git revision control</title>
|
||||
|
||||
<section id="git-intro">
|
||||
<title>Introduction to git</title>
|
||||
<para>
|
||||
You can browse the LDP github repository via the web at <ulink
|
||||
url="https://github.com/tLDP/">https://github.com/tLDP/</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Using git offers many advantages over other version control systems,
|
||||
but between git and github there's a few features that make it well
|
||||
suited for a distributed and diverse set of contributors:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Each user can have their own independent and up-to-date copy of the repository and modify it.</para></listitem>
|
||||
<listitem><para>Submitters do not need to have write access to the main repository to submit updates</para></listitem>
|
||||
<listitem><para>Using github relieves TLDP staff of managing account requests</para></listitem>
|
||||
<listitem><para>Ability to import changelogs from other VCS, so you can track changes going back about 16 years or more</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>These advantages come a bit a bit of a price in terms of increased complexity. There's a lot to git, but we'll cover enough here to manage documents in LDP.</para>
|
||||
<para>You can get an account on github by going to their <ulink
|
||||
url="https://github.com/">website</ulink> and signing up for a free
|
||||
account. For ease of use, you may want to use SSH keys to
|
||||
authenticate with github otherwise you will be asked to enter your
|
||||
password with each update.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="git-setup">
|
||||
<title>Setting up git on your local Linux system</title>
|
||||
|
||||
<para>Many different systems run git, but this document will focus on doing as many functions from the Linux command line as possible</para>
|
||||
<para>You will need to make sure that <command>git</command> is installed on your system. It isn't always installed by default so you may need to add it using your package manager such as <command>yum</command> or <command>apt-get</command></para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="git-first">
|
||||
<title>First time git setup</title>
|
||||
<para>The first time you start using github you'll need to run some
|
||||
commands</para>
|
||||
<itemizedlist>
|
||||
<listitem> <para>Clone the entire repository (about 400 MB) with: <command>git clone https://github.com/tLDP/LDP</command>
|
||||
</para> </listitem>
|
||||
|
||||
<listitem> <para>Go to the <ulink url="https://github.com/tLDP/LDP">LDP repository</ulink> on github and click on <option>Fork</option>. This will create your own copy of TLDP in your space that you can write to.</para></listitem>
|
||||
|
||||
<listitem> <para>Lastly, link your local repository with your repository on github with <command>git remote add upstream git@github.com/<replaceable>MyGithubID</replaceable>/LDP.git</command></para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</section>
|
||||
<section id="git-updates">
|
||||
<title>Submitting changes to TLDP</title>
|
||||
<para>Each time you make changes to TLDP you'll need to go through this
|
||||
process. It'll make sure that your changes are submitted for review and
|
||||
if approved, automatically added into TLDP</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Create a new branch using <command>git checkout -b <replaceable>MyNewBranch</replaceable></command></para></listitem>
|
||||
<listitem><para>Start making your changes, either editing files, or creating new ones. You can use <command>git diff</command> to see changes between what you have locally and what the last checked in repository is.</para></listitem>
|
||||
<listitem><para>If you added new files, you will need to use <command>git add <replaceable>filename</replaceable></command> to indicate that there are new files for git to manage.</para></listitem>
|
||||
<listitem><para>Now you commit the changes locally using <command>git commit</command>. This creates a new revision and drops you into an editor to add a comment for the changes you've made. You can include the <command>-m</command> option and a string to do this at the command line.</para></listitem>
|
||||
<listitem><para>Now you need to push your changes into your forked repository on github with <command>git push -u upstream <replaceable>MyNewBranch</replaceable></command></para></listitem>
|
||||
<listitem><para>From the github website, you will need to create a push request using your branch.</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>Once the push request is accepted, you can remove the branch using <command>git branch -D <replaceable>MyNewBranch</replaceable></command></para>
|
||||
</section>
|
||||
<!--
|
||||
<section id="git-resources">
|
||||
<title>git resources</title>
|
||||
<para>If you're completely new to git, there are a few web pages
|
||||
you may want to look at which can help you out: </para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para> <ulink
|
||||
url="http://cvshome.org/docs/blandy.html">http://cvshome.org/docs/blandy.html</ulink>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <ulink
|
||||
url="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">http://www.loria.fr/~molli/cvs/doc/cvs_toc.html</ulink></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
-->
|
||||
</appendix>
|
Loading…
Reference in New Issue