=head1 CLONING THE REPOSITORY
All of Perl's source code is kept centrally in a Git repository at
-I<perl5.git.perl.org>.
+I<github.com>.
You can make a read-only clone of the repository by running:
- % git clone git://perl5.git.perl.org/perl.git perl
+ % git clone git://github.com/Perl/perl5.git perl
This uses the git protocol (port 9418).
If you cannot use the git protocol for firewall reasons, you can also
-clone via http, though this is much slower:
+clone via http:
- % git clone https://perl5.git.perl.org/perl.git perl
+ % git clone https://github.com/Perl/perl5.git perl
=head1 WORKING WITH THE REPOSITORY
interactively. This is useful when the changes are more complex than
the sample given here, and, depending on the editor, to know that the
first line of the commit message doesn't exceed the 50 character legal
-maximum.
+maximum. See L<perlhack/Commit message> for more information about what
+makes a good commit message.
Once you've finished writing your commit message and exited your
editor, git will write your change to disk and tell you something like
% git branch -D orange
Deleted branch orange.
-=head2 Committing your changes
-
-Assuming that you'd like to commit all the changes you've made as a
-single atomic unit, run this command:
-
- % git commit -a
-
-(That C<-a> tells git to add every file you've changed to this commit.
-New files aren't automatically added to your commit when you use
-C<commit -a> If you want to add files or to commit some, but not all of
-your changes, have a look at the documentation for C<git add>.)
-
-Git will start up your favorite text editor, so that you can craft a
-commit message for your change. See L<perlhack/Commit message> for more
-information about what makes a good commit message.
-
-Once you've finished writing your commit message and exited your
-editor, git will write your change to disk and tell you something like
-this:
-
- Created commit daf8e63: explain git status and stuff about remotes
- 1 files changed, 83 insertions(+), 3 deletions(-)
-
-If you re-run C<git status>, you should see something like this:
-
- % git status
- On branch blead
- Your branch is ahead of 'origin/blead' by 2 commits.
- (use "git push" to publish your local commits)
- Untracked files:
- (use "git add <file>..." to include in what will be committed)
-
- deliberate.untracked
-
- nothing added to commit but untracked files present (use "git add" to
- track)
-
-When in doubt, before you do anything else, check your status and read
-it carefully, many questions are answered directly by the git status
-output.
-
=head2 Sending patch emails
After you've generated your patch you should send it
Someone may download your patch from RT, which will result in the
subject (the first line of the commit message) being omitted. See
L<RT #74192|https://rt.perl.org/Ticket/Display.html?id=74192> and
-L<commit a4583001|https://perl5.git.perl.org/perl.git/commitdiff/a4583001>
+L<commit a4583001|https://github.com/Perl/perl5/commit/a4583001>
for an example. Alternatively someone may
apply your patch from RT after it arrived in their mailbox, by which
time RT will have modified the inline content of the message. See
L<RT #74532|https://rt.perl.org/Ticket/Display.html?id=74532> and
-L<commit f9bcfeac|https://perl5.git.perl.org/perl.git/commitdiff/f9bcfeac>
+L<commit f9bcfeac|https://github.com/Perl/perl5/commit/f9bcfeac>
for a bad example of this failure mode.
=head2 A note on derived files
origin remote to enable pushing. Edit F<.git/config> with the
git-config(1) command:
- % git config remote.origin.url ssh://perl5.git.perl.org/perl.git
+ % git config remote.origin.url git@github.com:Perl/perl5.git
You can also set up your user name and e-mail address. Most people do
this once globally in their F<~/.gitconfig> by doing something like:
It is also possible to keep C<origin> as a git remote, and add a new
remote for ssh access:
- % git remote add camel perl5.git.perl.org:/perl.git
+ % git remote add camel git@github.com:Perl/perl5.git
This allows you to update your local repository by pulling from
C<origin>, which is faster and doesn't require you to authenticate, and
Before pushing any change to a maint version, make sure you've
satisfied the steps in L</Committing to blead> above.
-=head2 Merging from a branch via GitHub
-
-While we don't encourage the submission of patches via GitHub, that
-will still happen. Here is a guide to merging patches from a GitHub
-repository.
-
- % git remote add avar git://github.com/avar/perl.git
- % git fetch avar
-
-Now you can see the differences between the branch and blead:
-
- % git diff avar/orange
-
-And you can see the commits:
-
- % git log avar/orange
-
-If you approve of a specific commit, you can cherry pick it:
-
- % git cherry-pick 0c24b290ae02b2ab3304f51d5e11e85eb3659eae
-
-Or you could just merge the whole branch if you like it all:
-
- % git merge avar/orange
-
-And then push back to the repository:
-
- % git push origin blead
-
=head2 Using a smoke-me branch to test changes
Sometimes a change affects code paths which you cannot test on the OSes
OSes: push it to a "smoke-me" branch and wait for certain automated
smoke-testers to report the results from their OSes.
A "smoke-me" branch is identified by the branch name: specifically, as
-seen on perl5.git.perl.org it must be a local branch whose first name
+seen on github.com it must be a local branch whose first name
component is precisely C<smoke-me>.
The procedure for doing this is roughly as follows (using the example of
) and then delete your local branch:
% git branch -d win32stat
-
-=head2 A note on camel and dromedary
-
-The committers have SSH access to the two servers that serve
-C<perl5.git.perl.org>. One is C<perl5.git.perl.org> itself (I<camel>),
-which is the 'master' repository. The second one is
-C<users.perl5.git.perl.org> (I<dromedary>), which can be used for
-general testing and development. Dromedary syncs the git tree from
-camel every few minutes, you should not push there. Both machines also
-have a full CPAN mirror in F</srv/CPAN>, please use this. To share files
-with the general public, dromedary serves your F<~/public_html/> as
-C<L<https://users.perl5.git.perl.org/~yourlogin/>>
-
-These hosts have fairly strict firewalls to the outside. Outgoing, only
-rsync, ssh and git are allowed. For http and ftp, you can use
-L<http://webproxy:3128> as proxy. Incoming, the firewall tries to detect
-attacks and blocks IP addresses with suspicious activity. This
-sometimes (but very rarely) has false positives and you might get
-blocked. The quickest way to get unblocked is to notify the admins.
-
-These two boxes are owned, hosted, and operated by booking.com. You can
-reach the sysadmins in #p5p on irc.perl.org or via mail to
-L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>.
The perl source is in a git repository. You can clone the repository
with the following command:
- % git clone git://perl5.git.perl.org/perl.git perl
+ % git clone https://github.com/Perl/perl5.git perl
=item * Ensure you're following the latest advice
=head1 GETTING THE PERL SOURCE
All of Perl's source code is kept centrally in a Git repository at
-I<perl5.git.perl.org>. The repository contains many Perl revisions
+I<github.com>. The repository contains many Perl revisions
from Perl 1 onwards and all the revisions from Perforce, the previous
version control system.
You will need a copy of Git for your computer. You can fetch a copy of
the repository using the git protocol:
- % git clone git://perl5.git.perl.org/perl.git perl
+ % git clone git://github.com/Perl/perl5.git perl
This clones the repository and makes a local copy in the F<perl>
directory.
If you cannot use the git protocol for firewall reasons, you can also
-clone via http, though this is much slower:
+clone via http:
- % git clone https://perl5.git.perl.org/perl.git perl
+ % git clone https://github.com/Perl/perl5.git perl
=head2 Read access via the web
You may access the repository over the web. This allows you to browse
-the tree, see recent commits, subscribe to RSS feeds for the changes,
+the tree, see recent commits, subscribe to repository notifications,
search for particular commits and more. You may access it at
-L<https://perl5.git.perl.org/perl.git>. A mirror of the repository is
-found at L<https://github.com/Perl/perl5>.
+L<https://github.com/Perl/perl5>.
=head2 Read access via rsync