Skip to content

Commit

Permalink
Update usage documentation with cloning from a commit/tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-basevi committed Sep 18, 2024
1 parent 459082f commit 853e97c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,21 @@ For example::
Where ``${REPOSITORY}`` is the git URL or path of the repository to clone from,
for example, https://github.com/payu-org/mom-example.git.

To clone and checkout an existing git branch, use the ``--branch`` flag and
To clone and checkout an existing git branch, use the ``-B/--branch`` flag and
specify the branch name::

payu clone --branch ${EXISTING_BRANCH} ${REPOSITORY} my_expt

To create and checkout a new git branch use ``--new-branch`` and specify a
new branch name:
To create and checkout a new git branch use ``-b/--new-branch`` and specify a
new branch name::

payu clone --new-branch ${NEW_BRANCH} ${REPOSITORY} my_expt

To create a new git branch starting from a tag or commit, use ``-s/--start-point``
flag::

payu clone -b ${NEW_BRANCH} -s {COMMIT_HASH} ${REPOSITORY} my_expt

To see more configuration options for ``payu clone``,
run::

Expand Down

0 comments on commit 853e97c

Please sign in to comment.