threads / patch / 11941

patch, 2 partsDocumentation/git-svn.txt: Fix "git clone" example

Subject: [PATCH 2/2] Documentation/git-svn.txt: Fix "git clone" example

## tl;dr

One message between Feb 7, 2008 and Feb 7, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Peter Harris· Feb 7, 2008, 14:52 UTC · lore
Subject: [PATCH] Documentation/git-svn.txt: Fix "git clone" example

If you don't "git reset --hard" to create master, then the "git svn rebase" step fails.

Also add "-s" to use a standard layout, and remove the bogus '=' from the "git config" step.

Signed-off-by: Peter <git@peter.is-a-geek.org>
---
This time with a correctly spelled log message.
 Documentation/git-svn.txt |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Show changes to Documentation/git-svn.txt +5 −3
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index f94d0f9..b293a66 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -455,16 +455,18 @@ have each person clone that repository with 'git clone':
 
 ------------------------------------------------------------------------
 # Do the initial import on a server
-	ssh server "cd /pub && git svn clone http://svn.foo.org/project
+	ssh server "cd /pub && git svn clone -s http://svn.foo.org/project
 # Clone locally - make sure the refs/remotes/ space matches the server
 	mkdir project
 	cd project
 	git init
 	git remote add origin server:/pub/project
-	git config --add remote.origin.fetch=+refs/remotes/*:refs/remotes/*
+	git config --add remote.origin.fetch +refs/remotes/*:refs/remotes/*
 	git fetch
 # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
-	git svn init http://svn.foo.org/project
+	git svn init -s http://svn.foo.org/project
+# Check out the svn branch you want to work on
+	git reset --hard trunk
 # Pull the latest changes from Subversion
 	git svn rebase
 ------------------------------------------------------------------------
-- 
1.5.3.7

← back to recent threads