From: Rafael Garcia-Suarez Date: Fri, 26 Dec 2008 08:25:24 +0000 (+0100) Subject: Some additions to perlrepository.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f755e97d9b98701d9cda7e07b62003f40de9f18a;p=p5sagit%2Fp5-mst-13.2.git Some additions to perlrepository.pod mention git cherry-pick mention git checkout and git-reset fix a command example and formatting nits --- diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod index 384e290..4a5ff2c 100644 --- a/pod/perlrepository.pod +++ b/pod/perlrepository.pod @@ -32,7 +32,7 @@ the repository using the Git protocol (which uses port 9418): git clone git://perl5.git.perl.org/perl.git perl-git -This clones the repository and makes a local copy in the 'perl-git' +This clones the repository and makes a local copy in the F directory. If your local network does not allow you to use port 9418, then you can @@ -40,7 +40,7 @@ fetch a copy of the repository over HTTP (this is slower): git clone http://perl5.git.perl.org/perl.git perl-http -This clones the repository and makes a local copy in the 'perl-http' +This clones the repository and makes a local copy in the F directory. =head2 WRITE ACCESS TO THE REPOSITORY @@ -79,7 +79,7 @@ remote for ssh access: % git remote add camel user@camel:/gitroot/perl.git This allows you to update your local repository by pulling from -C, which is faster and doesn't require you to authentify, and +C, which is faster and doesn't require you to authenticate, and to push your changes back with the C remote: % git fetch camel @@ -93,14 +93,13 @@ themselves should have been fetched when pulling from C. Once you have changed into the repository directory, you can inspect it. - After a clone the repository will contain a single local branch, which will be the current branch as well, as indicated by the asterix. % git branch * blead -Using the -a switch to branch will also show the remote tracking +Using the -a switch to C will also show the remote tracking branches in the repository: % git branch -a @@ -253,7 +252,7 @@ to Orange Brocard, we should change his name in the AUTHORS file: You can see what files are changed: % git status - # On branch blead + # On branch orange # Changes to be committed: # (use "git reset HEAD ..." to unstage) # @@ -381,6 +380,11 @@ However, be aware this will delete ALL untracked content. You can use to remove all ignored untracked files, such as build and test byproduct, but leave any manually created files alone. +If you only want to cancel some uncommitted edits, you can use +C and give it a list of files to be reverted. + +If you want to cancel one or several commits, you can use C. + =head1 BISECTING C provides a built-in way to determine, with a binary search in @@ -452,7 +456,15 @@ tracking branch: % git checkout --track -b maint-5.005 origin/maint-5.005 -This creates a local branch named maint-5.005, which tracks the remote -branch origin/maint-5.005. Then you can pull, commit, merge and push as +This creates a local branch named C, which tracks the remote +branch C. Then you can pull, commit, merge and push as before. +You can also cherry-pick commits from blead and another branch, by +using the C command. It is recommended to use the B<-x> +option to C in order to record the SHA1 of the original +commit in the new commit message. + +=head1 SEE ALSO + +The git documentation, accessible via C.