Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to start using GitHub to store code for what will eventually be a CPAN module. What I want to know is if I should use GitHub for the "golden" copy and checkout from there to my local machine or create the main repo on my local machine and mirror it to GitHub.

I've been digging through various Google search results and can't find a clear answer for this.

Thanks!

  • Comment on Where to store the "golden" copy of a CPAN distro?

Replies are listed 'Best First'.
Re: Where to store the "golden" copy of a CPAN distro?
by atcroft (Abbot) on Aug 31, 2013 at 07:44 UTC

    (Full disclosure: I consider myself still rather new to Git and VC systems in general, even though I have used them from time to time.)

    Considering your question, you may want to refer to the "Integration-Manager Workflow" workflow in Scott Chacon's book, Pro Git, with an eye to using your GitHub repo as your "blessed" (golden?) repository (that anyone else wanting to work on the code pulls from), and your local repo as the "integration manager" repo illustrated in figure 5-2.

    (I also have tried to start using Vincent Driessen's branching model, with the idea that the master branch (and possibly the develop branch) would available in the "blessed" repository as working code.)

    Hope that helps.

Re: Where to store the "golden" copy of a CPAN distro?
by tobyink (Canon) on Aug 31, 2013 at 18:19 UTC

    Personally, I use a Mercurial repositories on my local machine, and then mirror them on both Bitbucket and (via the hggit plugin) Github. Provided they're all kept relatively up to date (and I tend to push after every few commits, but avoid pushing after a commit where the test suite is failing), there is no reason for any of them to be more official than any other. I'll happily accept pull requests through either Bitbucket or Github; they'll be pulled to my local repository and from there to the mirrors.

    In your META.yml/META.json file, point not to the repository you think if most "official", but to the one you think will be most useful for potential contributors. This is probably Github simply because of the vast number of programmers who already have logins for it.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re: Where to store the "golden" copy of a CPAN distro? (on github)
by Anonymous Monk on Aug 31, 2013 at 08:24 UTC

    Well, it doesn't matter :) you use github to share/publish your code , to get an issue/bug-tracker/wiki... to isolate your ip/computer from the rest of internet

    you need pgp/gnupg keys to publish to github, they're what make the github version "golden" ie official

    you can move away from github, its your public keys that make it official for everyone else

    Just remember to configure your git to not leave a history of every computer you've ever used :) and don't commit passwords and other sensitive data

    but you shouldn't worry about it , the actual chances of attracting interest enough for someone to fork your module and send you a pull request are low :)

    Also, FWIW, the way github works (last I checked years ago), you always create stuff locally and push to github (git push origin master)

    Read more about git/github and try it from your browser at git parable, practical git, git howto, try github found via What is the minimal GIT setup?

      I think you're misunderstanding the point of giving Github your SSH public keys. They are just there so git-over-ssh can work; not to make anything "official".

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

        I think you're misunderstanding the point of giving Github your SSH public keys. They are just there so git-over-ssh can work; not to make anything "official".

        Nope, merely misremembering/imagining that github did something extra , like sign some SHA1's with your public keys...