git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* importing history
@ 2011-06-29 13:45 Mihamina Rakotomandimby
  2011-06-29 14:25 ` Christof Krüger
  0 siblings, 1 reply; 6+ messages in thread
From: Mihamina Rakotomandimby @ 2011-06-29 13:45 UTC (permalink / raw)
  To: git

Hi,

Still newcomer in GIT ;-)

Let the nurpawiki SVN repo here:
http://code.google.com/p/nurpawiki/source/checkout

I know how to clone it using "git svn clone ..."
"git log" shows the whole history: fine!

Then I created an account in a forge (like github or so...), where I
had to clone an empty GIT repository in order to begin to work.
I dont have admin access to the forge, so no "scp" to the repo
hosting possible.

Now, I have 2 "local" repos:
- the one from the SVN
- the empty one from the forge

I am looking for a document that would teach me how to "import" the
"from-svn" into the empty one. What are the keywords for that action
(to help me searching)?

After I do that, I will just have to push to the previously empty
origin and I'm done.

Thanks for your help.


-- 
RMA.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: importing history
  2011-06-29 13:45 importing history Mihamina Rakotomandimby
@ 2011-06-29 14:25 ` Christof Krüger
  2011-06-29 16:56   ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Christof Krüger @ 2011-06-29 14:25 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: git

Hi,

> Then I created an account in a forge (like github or so...), where I
> had to clone an empty GIT repository in order to begin to work.
> I dont have admin access to the forge, so no "scp" to the repo
> hosting possible.
Why did you have to clone an empty repository? It should be enough to add
the correct remote config directly in your "from-svn" repository and just
push it.

> Now, I have 2 "local" repos:
> - the one from the SVN
> - the empty one from the forge

Now that you already have cloned the empty repository you can just look at
the remote configuration in it:

 git config --list|grep remote

You should see something like the following:

remote.origin.url=user@example.com/path/to/repository.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

Go to your from-svn repository and add the above configuration, then "git
push origin master".

Good luck!

Regards,
  Chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: importing history
  2011-06-29 14:25 ` Christof Krüger
@ 2011-06-29 16:56   ` Andreas Schwab
  2011-06-29 17:02     ` Christof Krüger
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2011-06-29 16:56 UTC (permalink / raw)
  To: Christof Krüger; +Cc: Mihamina Rakotomandimby, git

Christof Krüger <git@christof-krueger.de> writes:

> Now that you already have cloned the empty repository you can just look at
> the remote configuration in it:
>
>  git config --list|grep remote
>
> You should see something like the following:
>
> remote.origin.url=user@example.com/path/to/repository.git
> remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
>
> Go to your from-svn repository and add the above configuration, then "git
> push origin master".

Careful.  git svn uses the remotes namespace in a non-std way.  Better
to locally clone the from-svn repository into a new one, then use "git
remote add origin user@example.com/path/to/repository.git" to add the
remote repository.  Then you can safely push the master branch.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: importing history
  2011-06-29 16:56   ` Andreas Schwab
@ 2011-06-29 17:02     ` Christof Krüger
  2011-06-29 21:35       ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Christof Krüger @ 2011-06-29 17:02 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Mihamina Rakotomandimby, git

On Mi, 2011-06-29 at 18:56 +0200, Andreas Schwab wrote:
> Careful.  git svn uses the remotes namespace in a non-std way.  Better
> to locally clone the from-svn repository into a new one, then use "git
> remote add origin user@example.com/path/to/repository.git" to add the
> remote repository.  Then you can safely push the master branch.
Doesn't git svn use svn-remove.svn.* and not remote.*?
I've been doing that before and it worked for me.

"git svn dcommit" and "git push" are orthogonal to my understanding. If
you have an example, where git svn doesn't play well with "usual" git
remotes, I'd be happy to see them.

Regards,
  Chris 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: importing history
  2011-06-29 17:02     ` Christof Krüger
@ 2011-06-29 21:35       ` Andreas Schwab
  2011-06-30  5:00         ` Christof Krüger
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2011-06-29 21:35 UTC (permalink / raw)
  To: Christof Krüger; +Cc: Mihamina Rakotomandimby, git

Christof Krüger <git@christof-krueger.de> writes:

> On Mi, 2011-06-29 at 18:56 +0200, Andreas Schwab wrote:
>> Careful.  git svn uses the remotes namespace in a non-std way.  Better
>> to locally clone the from-svn repository into a new one, then use "git
>> remote add origin user@example.com/path/to/repository.git" to add the
>> remote repository.  Then you can safely push the master branch.
> Doesn't git svn use svn-remove.svn.* and not remote.*?

I'm not talking about the config options, but of the ref namespace.  If
your svn repository would have a branch named origin it would be stored
as refs/remotes/origin by git svn, which would conflict with "git remote
add origin ..."

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: importing history
  2011-06-29 21:35       ` Andreas Schwab
@ 2011-06-30  5:00         ` Christof Krüger
  0 siblings, 0 replies; 6+ messages in thread
From: Christof Krüger @ 2011-06-30  5:00 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Mihamina Rakotomandimby, git

On Mi, 2011-06-29 at 23:35 +0200, Andreas Schwab wrote:
> I'm not talking about the config options, but of the ref namespace.  If
> your svn repository would have a branch named origin it would be stored
> as refs/remotes/origin by git svn, which would conflict with "git remote
> add origin ..."
Ah, thanks for explaining.
As of now, I only had to do with rather "dump" SVN repositories with
only a trunk (or only non-stdlayout branches I didn't care about
anyways).

But do you think things could be seriously screwed up because of this?
Or would just one of the commands gracefully fail, leaving the
unexperienced user with an error message he doesn't understand?

Chris.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-30  5:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 13:45 importing history Mihamina Rakotomandimby
2011-06-29 14:25 ` Christof Krüger
2011-06-29 16:56   ` Andreas Schwab
2011-06-29 17:02     ` Christof Krüger
2011-06-29 21:35       ` Andreas Schwab
2011-06-30  5:00         ` Christof Krüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).