summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorAristotle Pagaltzis <pagaltzis@gmx.de>2010-03-24 23:12:36 -0400
committerDavid Golden <dagolden@cpan.org>2010-03-24 23:12:36 -0400
commitb16add97894081f7bc33c611a199d895830161d1 (patch)
tree62da33235d55daed8767c4cf883091f3f23c4bf5 /pod
parent33e5002f3018c3b84d4e92b5606666ab436dfd9b (diff)
downloadperl-b16add97894081f7bc33c611a199d895830161d1.tar.gz
give two simpler recipes for creating remote branches
Diffstat (limited to 'pod')
-rw-r--r--pod/perlrepository.pod28
1 files changed, 13 insertions, 15 deletions
diff --git a/pod/perlrepository.pod b/pod/perlrepository.pod
index 25bfaa29eb..9b0292b662 100644
--- a/pod/perlrepository.pod
+++ b/pod/perlrepository.pod
@@ -774,21 +774,19 @@ Individual committers should create topic branches under
B<yourname>/B<some_descriptive_name>. Other committers should check
with a topic branch's creator before making any change to it.
-A remote topic branch can be created as follows. First, create and
-checkout a local branch. Do some work on it, then when you're ready, push
-the local branch to the remote repository and update the local branch
-to make it track.
-
- $ branch="$user/$topic"
- $ git checkout -b $branch
- ... do local edits, commits etc ...
- $ git push origin $branch:refs/heads/$branch
- $ git config branch.$branch.remote origin
- $ git config branch.$branch.merge refs/heads/$branch
-
-Note that there are many ways to create remote branches, this is just one
-relatively straightforward way that should work with most git versions and
-configurations.
+The simplest way to create a remote topic branch that works on all
+versions of git is to push the current head as a new branch on the
+remote, then check it out locally:
+
+ $ branch="$yourname/$some_descriptive_name"
+ $ git push origin HEAD:$branch
+ $ git checkout -b $branch origin/$branch
+
+Users of git 1.7 or newer can do it in a more obvious manner:
+
+ $ branch="$yourname/$some_descriptive_name"
+ $ git checkout -b $branch
+ $ git push origin -u $branch
If you are not the creator of B<yourname>/B<some_descriptive_name>, you
might sometimes find that the original author has edited the branch's