.. _clone:

clone
=====

.. program:: clone

Synopsis
--------

::

    sample-rpkg clone [-h] [--branches] [--branch BRANCH] [--anonymous] [--depth DEPTH] repo [clone_target] ...

Description
-----------

This command will clone the named repository from the configured repository base URL. By default it will also checkout the master branch for your working copy.

Arguments
---------

.. option:: repo

   Name of the repository to clone. It should not be a Git URL. Should be 'namespace/repo-name' in case of namespaced dist-git. Otherwise, just 'repo-name'. Namespace examples are 'rpms', 'container', 'modules', 'flatpaks'. Default namespace 'rpms' can be ignored. 

.. option:: clone_target

   Directory in which to clone the repository

.. option:: extra_args

   Custom arguments that are passed to the 'git clone'. Use '--' to separate them from other arguments.



Options
-------

.. option:: -h --help

   show this help message and exit

.. option:: --branches -B

   Do an old style checkout with subdirs for branches

.. option:: --branch -b

   Check out a specific branch

.. option:: --anonymous -a

   Check out a module anonymously

.. option:: --depth

   Create a shallow clone with a history truncated to the specified number of commits