that all objects are downloaded.
  
* --prune -p:
  Prune old and unreferenced objects after fetching, equivalent to running
  git lfs prune afterwards. See git lfs prune for more details.
  
Include and exclude
-------------------

You can configure Git LFS to only fetch objects to satisfy references in certain
paths of the repo, and/or to exclude certain paths of the repo, to reduce the
time you spend downloading things you do not use.

In your Git configuration or in a .lfsconfig file, you may set either or
both of lfs.fetchinclude and lfs.fetchexclude to comma-separated lists of
paths.  If lfs.fetchinclude is defined, Git LFS objects will only be fetched
if their path matches one in that list, and if lfs.fetchexclude is defined,
Git LFS objects will only be fetched if their path does not match one
in that list.  Paths are matched using wildcard matching as per gitignore(5).

Note that using the command-line options -I and -X override the respective
configuration settings.  Setting either option to an empty string clears the
value.

Examples
--------

* git config lfs.fetchinclude "textures,images/foo*"
  
  This will only fetch objects referenced in paths in the textures folder, and
  files called foo* in the images folder
  
* git config lfs.fetchinclude "*.jpg,*.png,*.tga"
  
  Only fetch JPG/PNG/TGA files, wherever they are in the repository
  
* git config lfs.fetchexclude "media/reallybigfiles"
  
  Don't fetch any LFS objects referenced in the folder media/reallybigfiles, but
  fetch everything else
  
* git config lfs.fetchinclude "media"
  git config lfs.fetchexclude "media/excessive"
  
  Only fetch LFS objects in the 'media' folder, but exclude those in one of its
  subfolders.
  
Default remote
--------------

Without arguments, fetch downloads from the default remote.  The default remote
is the same as for git fetch, i.e. based on the remote branch you're tracking
first, or origin otherwise.

Default refs
------------

If no refs are given as arguments, the currently checked out ref is used. In
addition, if enabled, recently changed refs and commits are also
included. See "Recent changes" for details.

Recent changes
--------------

If the --recent option is specified, or if the gitconfig option
lfs.fetchrecentalways is true, then after the current ref (or those in the
arguments) is fetched, we also search for 'recent' changes to fetch
objects for, so that it's more convenient to checkout or diff those commits
without incurring further downloads.

What changes are considered 'recent' is based on a number of gitconfig options:

* lfs.fetchrecentrefsdays
  If non-zero, includes branches which have commits within N days of the current
  date. Only local refs are included unless lfs.fetchrecentremoterefs is true.
  The default is 7 days.
  
* lfs.fetchrecentremoterefs
  If true, fetches remote refs (for the remote you're fetching) as well as local
  refs in the recent window. This is useful to fetch objects for remote branches
  you might want to check out later. The default is true; if you set this to
  false, fetching for those branches will only occur when you either check them
  out (losing the advantage of fetch --recent), or create a tracking local
  branch separately then fetch again.
  
* lfs.fetchrecentcommitsdays
  In addition to fetching at branches, also fetches changes made within N
  days of the latest commit on the branch. This is useful if you're often
  reviewing recent changes. The default is 0 (no previous changes).
  
* lfs.fetchrecentalways
  Always operate as if --recent was provided on the command line.
  
  
Examples
--------

* Fetch the LFS objects for the current ref from default remote
  
  git lfs fetch
  
* Fetch the LFS objects for the current ref AND recent changes from default
  remote
  
  git lfs fetch --recent
  
* Fetch the LFS objects for the current ref from a secondary remote 'upstream'
  
  git lfs fetch upstream
  
* Fetch all the LFS objects from the default remote that are referenced by any
  commit in the main and develop branches
  
  git lfs fetch --all origin main develop
  
* Fetch the LFS objects for a branch from origin
  
  git lfs fetch origin mybranch
  
* Fetch the LFS objects for 2 branches and a commit from origin
  
  git lfs fetch origin main mybranch e445b45c1c9c6282614f201b62778e4c0688b5c8
  

git lfs prune [options]

Deletes local copies of LFS files which are old, thus freeing up disk space.
Prune operates by enumerating all the locally stored objects, and then deleting
any which are not referenced by at least ONE of the following:

* the current checkout
* all existing stashes
* a 'recent branch'; see "Recent files"
* a 'recent commit' on the current branch or recent branches; see "Recent files"
* a commit which has not been pushed; see "Unpushed lfs files"
* any other worktree checkouts; see git  worktree
  
  In general terms, prune will delete files you're not currently using and which
  are not 'recent', so long as they've been pushed i.e. the local copy is not the
  only one.
  
  The reflog is not considered, only commits. Therefore LFS objects that are
  only referenced by orphaned commits are always deleted.
  
  Note: you should not run git lfs prune if you have different repositories
  sharing the same custom storage directory; see git lfs config for more
  details about lfs.storage option.
  
  In your Git configuration or in a .lfsconfig file, you may set
  lfs.fetchexclude to a comma-separated list of paths.  If lfs.fetchexclude
  is defined, then any Git LFS files whose paths match one in that list will
  be pruned unless they are referenced by a stash or an unpushed commit.
  Paths are matched using wildcard matching as per gitignore(5).
  
Options:

* --dry-run -d
  Don't actually delete anything, just report on what would have been done
  
* --force -f
  Prune all objects except unpushed objects, including objects required for
  currently checked out refs.  Implies --recent.
  
* --recent
  Prune even objects that would normally be preserved by the configuration
  options specified below in "Recent files".
  
* --verify-remote -c
  Contact the remote and check that copies of the files we would delete
  definitely exist before deleting. See "Verify remote".
  
* --no-verify-remote
  Disables remote verification if lfs.pruneverifyremotealways was enabled in
  settings. See "Verify remote".
  
* --verbose -v
  Report the full detail of what is/would be deleted.
  
Recent files
------------

Prune won't delete LFS files referenced by 'recent' commits, in case you want
to use them again without having to download. The definition of 'recent' is
derived from the one used by git lfs fetch to download recent objects with
the --recent option, with an offset of a number of days (default 3) to ensure
that we always keep files you download for a few days.

Here are the git  config settings that control this behaviour:

* lfs.pruneoffsetdays 
  The number of extra days added to the fetch recent settings when using them
  to decide when to prune. So for a reference to be considered old enough to
  prune, it has to be this many days older than the oldest reference that would
  be downloaded via git lfs fetch --recent. Only used if the relevant
  fetch recent 'days' setting is non-zero. Default 3 days.
  
* lfs.fetchrecentrefsdays 
  lfs.fetchrecentremoterefs 
  lfs.fetchrecentcommitsdays 
  These have the same meaning as git lfs fetch with the --recent option,
  they are used as a base for the offset above. Anything which falls outside
  of this offsetted window is considered old enough to prune. If a day value is
  zero, that condition is not used at all to retain objects and they will be
  pruned.
  
Unpushed lfs files
------------------

When the only copy of an LFS file is local, and it is still reachable from any
reference, that file can never be pruned, regardless of how old it is.

To determine whether an LFS file has been pushed, we check the difference
between local refs and remote refs; where the local ref is ahead, any LFS files
referenced in those commits is unpushed and will not be deleted. This works
because the LFS pre-push hook always ensures that LFS files are pushed before
the remote branch is updated.

See "Default remote", for which remote is considered 'pushed' for pruning
purposes.

Verify remote
-------------

The --verify-remote option calls the remote to ensure that any LFS files to be
deleted have copies on the remote before actually deleting them.

Usually the check performed by "Unpushed lfs files" is enough to determine that
files have been pushed, but if you want to be extra sure at the expense of extra
overhead you can make prune actually call the remote API and verify the
presence of the files you're about to delete locally. See "Default remote" for
which remote is checked.

You can make this behaviour the default by setting lfs.pruneverifyremotealways
to true.

In addition to the overhead of calling the remote, using this option also
requires prune to distinguish between totally unreachable files (e.g. those that
were added to the index but never committed, or referenced only by orphaned
commits), and files which are still referenced, but by commits which are
prunable. This makes the prune process take longer.

Default remote
--------------

When identifying "Unpushed lfs files" and performing "Verify remote", a single
remote, 'origin', is normally used as the reference.  This one remote is
considered canonical; even if you use multiple remotes, you probably want to
retain your local copies until they've made it to that remote. 'origin' is used
by default because that will usually be a main central repo, or your fork of
it - in both cases that's a valid remote backup of your work. If origin doesn't
exist then by default nothing will be pruned because everything is treated as
'unpushed'.

You can alter the remote via git config: lfs.pruneremotetocheck. Set this
to a different remote name to check that one instead of 'origin'.


__%[1]s_debug()
{
    if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
        echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
    fi
}

# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
# _init_completion. This is a very minimal version of that function.
__%[1]s_init_completion()
{
    COMPREPLY=()
    _get_comp_words_by_ref "$@" cur prev words cword
}

__%[1]s_index_of_word()
{
    local w word=$1
    shift
    index=0
    for w in "$@"; do
        [[ $w = "$word" ]] && return
        index=$((index+1))
    done
    index=-1
}

__%[1]s_contains_word()
{
    local w word=$1; shift
    for w in "$@"; do
        [[ $w = "$word" ]] && return
    done
    return 1
}

__%[1]s_handle_reply()
{
    __%[1]s_debug "${FUNCNAME[0]}"
    case $cur in
        -*)
            if [[ $(type -t compopt) = "builtin" ]]; then
                compopt -o nospace
            fi
            local allflags
            if [ ${#must_have_one_flag[@]} -ne 0 ]; then
                allflags=("${must_have_one_flag[@]}")
            else
                allflags=("${flags[*]} ${two_word_flags[*]}")
            fi
            COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
            if [[ $(type -t compopt) = "builtin" ]]; then
                [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
            fi

            # complete after --flag=abc
            if [[ $cur == *=* ]]; then
                if [[ $(type -t compopt) = "builtin" ]]; then
                    compopt +o nospace
                fi

                local index flag
                flag="${cur%%=*}"
                __%[1]s_index_of_word "${flag}" "${flags_with_completion[@]}"
                COMPREPLY=()
                if [[ ${index} -ge 0 ]]; then
                    PREFIX=""
                    cur="${cur#*=}"
                    ${flags_completion[${index}]}
                    if [ -n "${ZSH_VERSION}" ]; then
                        # zsh completion needs --flag= prefix
                        eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
                    fi
                fi
            fi
            return 0;
            ;;
    esac

    # check if we are handling a flag with special work handling
    local index
    __%[1]s_index_of_word "${prev}" "${flags_with_completion[@]}"
    if [[ ${index} -ge 0 ]]; then
        ${flags_completion[${index}]}
        return
    fi

    # we are parsing a flag and don't have a special handler, no completion
    if [[ ${cur} != "${words[cword]}" ]]; then
        return
    fi

    local completions
    completions=("${commands[@]}")
    if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
        completions=("${must_have_one_noun[@]}")
    fi
    if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
        completions+=("${must_have_one_flag[@]}")
    fi
    COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )

    if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
        COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
    fi

    if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
        declare -F __custom_func >/dev/null && __custom_func
    fi

    # available in bash-completion >= 2, not always present on macOS
    if declare -F __ltrim_colon_completions >/dev/null; then
        __ltrim_colon_completions "$cur"
    fi

    # If there is only 1 completion and it is a flag with an = it will be completed
    # but we don't want a space after the =
    if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then
       compopt -o nospace
    fi
}

# The arguments should be in the form "ext1|ext2|extn"
__%[1]s_handle_filename_extension_flag()
{
    local ext="$1"
    _filedir "@(${ext})"
}

__%[1]s_handle_subdirs_in_dir_flag()
{
    local dir="$1"
    pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
}

__%[1]s_handle_flag()
{
    __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    # if a command required a flag, and we found it, unset must_have_one_flag()
    local flagname=${words[c]}
    local flagvalue
    # if the word contained an =
    if [[ ${words[c]} == *"="* ]]; then
        flagvalue=${flagname#*=} # take in as flagvalue after the =
        flagname=${flagname%%=*} # strip everything after the =
        flagname="${flagname}=" # but put the = back
    fi
    __%[1]s_debug "${FUNCNAME[0]}: looking for ${flagname}"
    if __%[1]s_contains_word "${flagname}" "${must_have_one_flag[@]}"; then
        must_have_one_flag=()
    fi

    # if you set a flag which only applies to this command, don't show subcommands
    if __%[1]s_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then
      commands=()
    fi

    # keep flag value with flagname as flaghash
    # flaghash variable is an associative array which is only supported in bash > 3.
    if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
        if [ -n "${flagvalue}" ] ; then
            flaghash[${flagname}]=${flagvalue}
        elif [ -n "${words[ $((c+1)) ]}" ] ; then
            flaghash[${flagname}]=${words[ $((c+1)) ]}
        else
            flaghash[${flagname}]="true" # pad "true" for bool flag
        fi
    fi

    # skip the argument to a two word flag
    if __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then
        c=$((c+1))
        # if we are looking for a flags value, don't show commands
        if [[ $c -eq $cword ]]; then
            commands=()
        fi
    fi

    c=$((c+1))

}

__%[1]s_handle_noun()
{
    __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    if __%[1]s_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
        must_have_one_noun=()
    elif __%[1]s_contains_word "${words[c]}" "${noun_aliases[@]}"; then
        must_have_one_noun=()
    fi

    nouns+=("${words[c]}")
    c=$((c+1))
}

__%[1]s_handle_command()
{
    __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"

    local next_command
    if [[ -n ${last_command} ]]; then
        next_command="_${last_command}_${words[c]//:/__}"
    else
        if [[ $c -eq 0 ]]; then
            next_command="_%[1]s_root_command"
        else
            next_command="_${words[c]//:/__}"
        fi
    fi
    c=$((c+1))
    __%[1]s_debug "${FUNCNAME[0]}: looking for ${next_command}"
    declare -F "$next_command" >/dev/null && $next_command
}

__%[1]s_handle_word()
{
    if [[ $c -ge $cword ]]; then
        __%[1]s_handle_reply
        return
    fi
    __%[1]s_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
    if [[ "${words[c]}" == -* ]]; then
        __%[1]s_handle_flag
    elif __%[1]s_contains_word "${words[c]}" "${commands[@]}"; then
        __%[1]s_handle_command
    elif [[ $c -eq 0 ]]; then
        __%[1]s_handle_command
    elif __%[1]s_contains_word "${words[c]}" "${command_aliases[@]}"; then
        # aliashash variable is an associative array which is only supported in bash > 3.
        if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
            words[c]=${aliashash[${words[c]}]}
            __%[1]s_handle_command
        else
            __%[1]s_handle_noun
        fi
    else
        __%[1]s_handle_noun
    fi
    __%[1]s_handle_word
}

