more code-blocks

This commit is contained in:
Axel Kohlmeyer 2020-02-22 06:14:52 -05:00
parent 09ef55ac26
commit a915397668
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 15 additions and 17 deletions

View File

@ -3,10 +3,8 @@ LAMMPS GitHub tutorial
**written by Stefan Paquay**
----------
This document describes the process of how to use GitHub to integrate
changes or additions you have made to LAMMPS into the official LAMMPS
distribution. It uses the process of updating this very tutorial as
@ -84,14 +82,14 @@ First of all, create a clone of your version on github on your local
machine via HTTPS:
.. parsed-literal::
.. code-block:: bash
$ git clone https://github.com/<your user name>/lammps.git <some name>
or, if you have set up your GitHub account for using SSH keys, via SSH:
.. parsed-literal::
.. code-block:: bash
$ git clone git@github.com:<your user name>/lammps.git
@ -111,7 +109,7 @@ To pull changes from upstream into this copy, you can go to the directory
and use git pull:
.. parsed-literal::
.. code-block:: bash
$ cd mylammps
$ git checkout master
@ -120,7 +118,7 @@ and use git pull:
You can also add this URL as a remote:
.. parsed-literal::
.. code-block:: bash
$ git remote add lammps_upstream https://www.github.com/lammps/lammps
@ -130,7 +128,7 @@ workflow that updated this tutorial, and hence we will call the branch
"github-tutorial-update":
.. parsed-literal::
.. code-block:: bash
$ git checkout -b github-tutorial-update master
@ -143,7 +141,7 @@ unrelated feature, you should switch branches!
After everything is done, add the files to the branch and commit them:
.. parsed-literal::
.. code-block:: bash
$ git add doc/src/Howto_github.txt
$ git add doc/src/JPG/tutorial\*.png
@ -167,14 +165,14 @@ After adding all files, the change set can be committed with some
useful message that explains the change.
.. parsed-literal::
.. code-block:: bash
$ git commit -m 'Finally updated the github tutorial'
After the commit, the changes can be pushed to the same branch on GitHub:
.. parsed-literal::
.. code-block:: bash
$ git push
@ -183,7 +181,7 @@ not configured anything. If your local branch is not present on GitHub yet,
it will ask you to add it by running
.. parsed-literal::
.. code-block:: bash
$ git push --set-upstream origin github-tutorial-update
@ -194,14 +192,14 @@ If you want to make really sure you push to the right repository
(which is good practice), you can provide it explicitly:
.. parsed-literal::
.. code-block:: bash
$ git push origin
or using an explicit URL:
.. parsed-literal::
.. code-block:: bash
$ git push git@github.com:Pakketeretet2/lammps.git
@ -410,7 +408,7 @@ Now, since in the meantime our local text for the tutorial also changed,
we need to pull Axel's change back into our branch, and merge them:
.. parsed-literal::
.. code-block:: bash
$ git add Howto_github.txt
$ git add JPG/tutorial_reverse_pull_request\*.png
@ -427,7 +425,7 @@ branch is now perfect as far as we are concerned, so we are going to
commit and push again:
.. parsed-literal::
.. code-block:: bash
$ git add Howto_github.txt
$ git add JPG/tutorial_reverse_pull_request6.png
@ -458,7 +456,7 @@ keep it a bit more tidy. Note that you first have to switch to another
branch!
.. parsed-literal::
.. code-block:: bash
$ git checkout master
$ git pull master
@ -474,7 +472,7 @@ Finally, if you delete the branch locally, you might want to push this
to your remote(s) as well:
.. parsed-literal::
.. code-block:: bash
$ git push origin :github-tutorial-update