Skip to content

Commit 9e77353

Browse files
jastgitster
authored andcommitted
Documentation: git-svn: fix example for centralized SVN clone
The example that tells users how to centralize the effort of the initial git svn clone operation doesn't work properly. It uses rebase but that only works if HEAD exists. This adds one extra command to create a somewhat sensible HEAD that should work in all cases. Signed-off-by: Jan Krüger <jk@jk.gs> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent de07767 commit 9e77353

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Documentation/git-svn.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ have each person clone that repository with 'git-clone':
522522
git remote add origin server:/pub/project
523523
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
524524
git fetch
525+
# Create a local branch from one of the branches just fetched
526+
git checkout -b master FETCH_HEAD
525527
# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
526528
git svn init http://svn.example.com/project
527529
# Pull the latest changes from Subversion

0 commit comments

Comments
 (0)