Skip to content

Commit

Permalink
git svn: fix the final example in man page
Browse files Browse the repository at this point in the history
'git-remote add' creates a remote.origin.fetch entry in the config, we
want to replace this entry rather than add another one (which will
cause 'git fetch' to error).

This adds 'git config --remove-section remote.origin' after the fetch
for encouraging users to only use "git svn" for future updates.

[ew: rewording of commit message for present tense]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: StephenB <mail4stb@gmail.com>
  • Loading branch information
StephenB authored and Eric Wong committed Jan 7, 2011
1 parent bc2d159 commit 9cfdbf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,11 @@ have each person clone that repository with 'git clone':
cd project
git init
git remote add origin server:/pub/project
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
git fetch
# Prevent fetch/pull from remote git server in the future,
# we only want to use git svn for future updates
git config --remove-section remote.origin
# Create a local branch from one of the branches just fetched
git checkout -b master FETCH_HEAD
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
Expand Down

0 comments on commit 9cfdbf9

Please sign in to comment.