Skip to content

Commit

Permalink
Update gitinfo.rst [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Jun 19, 2023
1 parent 7e18a84 commit d3fbe44
Showing 1 changed file with 11 additions and 28 deletions.
39 changes: 11 additions & 28 deletions docs/gitinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Getting your first copy

Once you have a GitHub account, you must create your own :doc:`fork <fork>`.
This is done using the “fork” button (the big button on top right of the
repo page). You can then clone your fork to your computer:

::
repo page). You can then clone your fork to your computer::

git clone https://github.com/USERNAME/phantom.git

Expand All @@ -21,9 +19,7 @@ Setting your username and email address
---------------------------------------

Before you can push changes, you must ensure that your name and email
address are set, as follows:

::
address are set, as follows::

cd phantom
git config --global user.name "Joe Bloggs"
Expand All @@ -35,9 +31,7 @@ in the commit logs (and in the AUTHORS file)
Receiving updates from your fork
--------------------------------

Procedure is: stash your changes, pull the updates, reapply your changes

::
Procedure is: stash your changes, pull the updates, reapply your changes::

git stash
git pull
Expand All @@ -47,18 +41,14 @@ Receiving updates from the master branch
----------------------------------------

Before you can receive updates from the master branch, you must first link
your fork to the master branch:

::
your fork to the master branch::

git remote add upstream https://github.com/danieljprice/phantom.git

This only needs to be done once.

To update, the procedure is: stash your changes, pull the updates,
reapply your changes

::
reapply your changes::

git stash
git fetch upstream
Expand All @@ -72,34 +62,27 @@ Committing changes to your fork

Submit changes to Phantom carefully! The first thing is to pull any
upstream changes as described above. Once you have done this, first
check what you will commit:

::
check what you will commit::

git diff

then go through each subset of changes you have made and commit the
file(s) with a message:

::
file(s) with a message::

git commit -m 'changed units in dim file for problem x' src/main/dim_myprob.f90

and so on, for all the files that you want to commit. Then, when you’re
ready to push the changeset back to your fork use

::
ready to push the changeset back to your fork use::

git push

Note that you will only be allowed to push changes if you have already
updated your copy to the latest version.

If you have just updated your code from the master repo, simply update
your fork via
your fork via::

::
git commit
git commit -m 'merge'
git push

This will push all the remote changes to your forked version of Phantom.
Expand All @@ -108,7 +91,7 @@ Committing changes to the master branch
---------------------------------------

This is done through a “pull request”. To do this,
you can click the big “pull request” button on the GitHub page to request
you can click the “contribute” button on the GitHub page to request
that your changes be pulled into the master copy of Phantom. Please do
this frequently. Many small pull requests are much better than one giant
pull request!
Expand Down

0 comments on commit d3fbe44

Please sign in to comment.