Dist::...::Init(3pm)

πŸ’– Dist::Zilla::Plugin::Git::Init β€” aka Dist::...::Init(3pm) πŸ’–

okay bestie, buckle up, because this is the manual page for Dist::Zilla::Plugin::Git::Init and it's genuinely iconic. it's giving "your dist just got born and we're handing it a git repo in the delivery room" energy. πŸŽ€


✨ VERSION ✨

version 2.052


🌸 SYNOPSIS 🌸

so you write this in your profile.ini, right? like this, exactly:

[Git::Init]
commit_message = initial commit  ; this is the default
stage = 1                        ; this is the default
commit = 1                       ; this is the default
branch =                         ; this is the default (uses init.defaultBranch config)
remote = origin https://github.com/USERNAME/%N.git ; no default
push_url = origin git@github.com:USERNAME/%{lc}N.git ; no default
config = user.email USERID@cpan.org  ; there is no default

and that's it. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

this plugin initializes a git repository when a brand new distribution gets created with dzil new. no cap, it just does it. your fresh little dist wakes up and there's already a .git in there. main character behavior fr fr.


πŸ‘‘ Plugin options

the plugin says yes to these options:

  • commit_message β€” the commit message it uses when checking in your newly-minted dist. defaults to initial commit.
  • stage β€” if it's true (and yes, true is the default), it stages all the files in the newly-minted dist directory (that's "add to Git index", for the uninitiated). but here's the tea: if commit is true AND stage is false, Git will make an empty commit. and an empty commit is totally a valid commit β€” it can legitimately be the very first commit (the root commit) in a repository. so it's not a bug, it's a feature, iykyk. 🫢
  • commit β€” if true (default, obviously πŸ’…), it commits the newly-minted dist. if you set it to a false value, it adds the files to the Git index but does not actually make a commit. just... hovering. waiting. πŸ™ˆ
  • branch β€” the branch name the newly-minted dist gets checked in under (only if commit is true, bestie). defaults to an empty string, which means the Git default branch gets used β€” whatever you've got configured in git config init.defaultBranch.
  • config β€” a config setting to make in the repository. by default, no config entries get made. a setting is specified as OPTION VALUE. you can pass this multiple times to add multiple entries. go off. ✨
  • remote β€” a remote to add to the repository. by default, no remotes get added. a remote is specified as NAME URL. you can pass this multiple times to add multiple remotes.
  • push_url β€” the URL to use to push to a particular remote, added to the repository. by default, no URLs get added. a remote is specified as NAME URL. you can pass this multiple times to set push URLs for multiple remotes, and honestly you don't even need it if the URL is the same as the one already set for that remote. 🌈

per the documentation for git-remote(1): note that the push_url and the corresponding URL specified with remote, even though they can be set differently, must still refer to the same place. what you pushed to the push URL should be what you would see if you immediately fetched from the fetch URL (the URL specified with remote.) if you're trying to fetch from one place (e.g. your upstream) and push to another (e.g. your publishing repository), use two separate remotes. don't be messy about it bestie, it will not end well. πŸ’€

so like, this is best used in cases where pushing requires authentication but pulling doesn't, or if pulling is via git or ssh but pushing is via https, on the same repository. niche but valid. 🧚


⭐ Formatting options

you can use these codes inside commit_message, config, remote, or push_url:

  • %n β€” a newline.
  • %N β€” the distribution name. you can also use %{lc}N or %{uc}N to get the name in lower case or upper case respectively. cute, right? πŸ’œ

🌟 SUPPORT 🌟

bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Git> (or bug-Dist-Zilla-Plugin-Git@rt.cpan.org <mailto:bug-Dist-Zilla-Plugin-Git@rt.cpan.org>).

there's also a mailing list available for users of this distribution, at <http://dzil.org/#mailing-list>.

and there's also an irc channel available for users of this distribution, at #distzilla on irc.perl.org <irc://irc.perl.org/#distzilla>. come hang out, the vibes are immaculate. 🌸


πŸ™Œ AUTHOR πŸ™Œ

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.


okay that's the whole page bestie, you're officially certified πŸ’… this was perl v5.40.1 doing its thing on 2025-09-29, and yeah the footer says Dist::...::Init(3pm) because the page title got truncated and honestly? relatable. go init that repo. periodt. πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from