git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15410 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-07-30 16:09:11 +00:00
parent 5b5f839265
commit fd05571ee0
10 changed files with 97 additions and 65 deletions

View File

@ -126,26 +126,20 @@
<div class="section" id="lammps-github-tutorial">
<h1>LAMMPS GitHub tutorial</h1>
<div class="section" id="written-by-stefan-paquay">
<h2>written by Stefan Paquay</h2>
<p><strong>written by Stefan Paquay</strong></p>
<hr class="docutils" />
<p>This document briefly describes how to use GitHub to merge changes
into LAMMPS using GitHub. It assumes that you are familiar with
<p>This document briefly describes how to use GitHub to merge changes you
make into LAMMPS, using GitHub. It assumes that you are familiar with
git. You may want to have a look at the <a class="reference external" href="http://git-scm.com/book/">Git book</a> to reacquaint yourself.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="making-an-account">
<h1>Making an account</h1>
<p><strong>Making an account</strong></p>
<p>First of all, you need a GitHub account. This is fairly simple, just
go to <a class="reference external" href="https://github.com">GitHub</a> and create an account by clicking
the <a href="#id1"><span class="problematic" id="id2">``</span></a>Sign up for GitHub&#8217;&#8217; button. Once your account is created, you
can sign in by clicking the button in the top left and filling in your
username or e-mail address and password.</p>
</div>
<hr class="docutils" />
<div class="section" id="forking-the-repository">
<h1>Forking the repository</h1>
<p><strong>Forking the repository</strong></p>
<p>To get changes into LAMMPS, you need to first fork the repository. At
the time of writing, LAMMPS-ICMS is the preferred fork. Go to <a class="reference external" href="https://github.com/lammps/lammps">LAMMPS on GitHub</a> and make sure branch is
set to <a href="#id3"><span class="problematic" id="id4">``</span></a>lammps-icms&#8217;&#8216;, see the figure below.</p>
@ -157,14 +151,11 @@ changes in this fork and later file <em>pull requests</em> to allow the
upstream repository to merge changes from your own fork into the one
we just forked from. At the same time, you can set things up, so you
can include changes from upstream into your repository.</p>
</div>
<hr class="docutils" />
<div class="section" id="adding-changes-to-your-own-fork">
<h1>Adding changes to your own fork</h1>
<p><strong>Adding changes to your own fork</strong></p>
<p>Before adding changes, it is better to first create a new branch that
will contain these changes, a so-called feature branch.</p>
<div class="section" id="feature-branches">
<h2>Feature branches</h2>
<p><strong>Feature branches</strong></p>
<p>Since LAMMPS is such a big project and most user contributions come in
small portions, the most ideal workflow for LAMMPS is the so-called
<a href="#id5"><span class="problematic" id="id6">``</span></a>Feature branch&#8217;&#8217; workflow. It is explained in great detail here:
@ -210,8 +201,7 @@ $ git add doc/fix_manifoldforce.txt doc/user_manifolds.txt
</div>
<p>The &#8220;-m&#8221; switch is used to add a message to the commit. Use this to
indicate what type of change was commited.</p>
<div class="section" id="wisdom-by-axel">
<h3>Wisdom by Axel:</h3>
<p><strong>Wisdom by Axel</strong></p>
<p><em>&#8220;Do not use &#8220;git commit -a&#8221;. the -a flag will automatically include
*all</em> modified or new files. mercurial does that and it find it
hugely annoying and often leading to accidental commits of files you
@ -262,19 +252,13 @@ is now up to the maintainer(s) of the upstream repository to
incorporate the changes into the repository and to close the pull
request.</p>
<img alt="_images/tutorial_pull_request4.png" class="align-center" src="_images/tutorial_pull_request4.png" />
</div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="additional-changes">
<h1>Additional changes</h1>
<p><strong>Additional changes</strong></p>
<p>Before the pull request is accepted, any additional changes you push
into your repository will automatically become part of the pull
request.</p>
</div>
<hr class="docutils" />
<div class="section" id="after-a-merge">
<h1>After a merge</h1>
<p><strong>After a merge</strong></p>
<p>When everything is fine the feature branch is merged into the LAMMPS
repositories:</p>
<img alt="_images/tutorial_merged.png" class="align-center" src="_images/tutorial_merged.png" />