The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

subrepo - Git Submodule Alternative

ABSTRACT

DESCRIPTION

This is just an example for generating completion for an existing command, https://github.com/ingydotnet/git-subrepo

This git command "clones" an external git repo into a subdirectory of your repo. Later on, upstream changes can be pulled in, and local changes can be pushed back. Simple.

Benefits

This command is an improvement from git-submodule and git-subtree; two other git commands with similar goals, but various problems.

GLOBAL OPTIONS

    --help -h    Show command help (flag)

SUBCOMMANDS

branch

    subrepo  branch [options] [<subrepo>]

Create a branch with local subrepo commits since last pull.

Options:

    --all    All subrepos (flag)

Parameters:

    subrepo    Subrepo

clean

    subrepo  clean [options] [<subrepo>]

Remove artifacts created by fetch and branch commands.

Options:

    --all    All subrepos (flag)

Parameters:

    subrepo    Subrepo

clone

    subrepo  clone [options] <repository> [<subdir>]

Add a repository as a subrepo in a subdir of your repository.

Options:

    --branch -b    Upstream branch                                        
    --force -f     reclone (completely replace) an existing subdir. (flag)

Parameters:

    repository  *  
    subdir         

commit

    subrepo  commit <subrepo> [<subreporef>]

Add subrepo branch to current history as a single commit.

Parameters:

    subrepo     *  Subrepo    
    subreporef     Subrepo ref

fetch

    subrepo  fetch [options] [<subrepo>]

Fetch the remote/upstream content for a subrepo.

Options:

    --all    All subrepos (flag)

Parameters:

    subrepo    Subrepo

init

    subrepo  init [options] <subdir>

Turn an existing subdirectory into a subrepo.

Options:

    --remote -r    Specify remote repository
    --branch -b    Upstream branch          

Parameters:

    subdir  *  

pull

    subrepo  pull [options] [<subrepo>]

Update the subrepo subdir with the latest upstream changes.

Options:

    --all          All subrepos (flag)      
    --branch -b    Upstream branch          
    --remote -r    Specify remote repository
    --update -u    update                   

Parameters:

    subrepo    Subrepo

push

    subrepo  push [options] [<subrepo>]

Push a properly merged subrepo branch back upstream.

Options:

    --all          All subrepos (flag)      
    --branch -b    Upstream branch          
    --remote -r    Specify remote repository
    --update -u    update                   

Parameters:

    subrepo    Subrepo

status

    subrepo  status [options] [<subrepo>]

Get the status of a subrepo.

Options:

    --quiet -q    Just print names

Parameters:

    subrepo    Subrepo

version

    subrepo  version

display version information about git-subrepo

help

    subrepo  help

Same as git help subrepo