Scroll to navigation

Dist::Zilla::Plugin::Git::Init(3pm) User Contributed Perl Documentation Dist::Zilla::Plugin::Git::Init(3pm)


Dist::Zilla::Plugin::Git::Init - Initialize git repository on dzil new


version 2.047


In your profile.ini:

    commit_message = initial commit  ; this is the default
    commit = 1                       ; this is the default
    branch =                         ; this is the default (means master)
    remote = origin{lc}N.git ; no default
    config =  ; there is no default


This plugin initializes a git repository when a new distribution is created with "dzil new".

Plugin options

The plugin accepts the following options:
  • commit_message - the commit message to use when checking in the newly-minted dist. Defaults to "initial commit".
  • commit - if true (the default), commit the newly-minted dist. If set to a false value, add the files to the Git index but don't actually make a commit.
  • branch - the branch name under which the newly-minted dist is checked in (if "commit" is true). Defaults to an empty string, which means that the Git default branch is used (master).
  • config - a config setting to make in the repository. No config entries are made by default. A setting is specified as "OPTION VALUE". This may be specified multiple times to add multiple entries.
  • remote - a remote to add to the repository. No remotes are added by default. A remote is specified as "NAME URL". This may be specified multiple times to add multiple remotes.

Formatting options

You can use the following codes in "commit_message", "config", or "remote":
A newline.
The distribution name. You can also use "%{lc}N" or "%{uc}N" to get the name in lower case or upper case, respectively.


Bugs may be submitted through the RT bug tracker <> (or <>).

There is also a mailing list available for users of this distribution, at <>.

There is also an irc channel available for users of this distribution, at "#distzilla" on "" <irc://>.


Jerome Quelin


This software is copyright (c) 2009 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2020-09-13 perl v5.30.3