Skip to content

Commit 9cfdbf9

Browse files
stepbEric Wong
authored andcommitted
git svn: fix the final example in man page
'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 <[email protected]> Signed-off-by: StephenB <[email protected]>
1 parent bc2d159 commit 9cfdbf9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/git-svn.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,11 @@ have each person clone that repository with 'git clone':
729729
cd project
730730
git init
731731
git remote add origin server:/pub/project
732-
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
732+
git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
733733
git fetch
734+
# Prevent fetch/pull from remote git server in the future,
735+
# we only want to use git svn for future updates
736+
git config --remove-section remote.origin
734737
# Create a local branch from one of the branches just fetched
735738
git checkout -b master FETCH_HEAD
736739
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)

0 commit comments

Comments
 (0)