开发者

Git confusion - getting git repo on server after switch from svn

开发者 https://www.devze.com 2023-01-09 02:28 出处:网络
I have a 3 year old svn repo I just converted to git using git-svn.Then I cloned the new repo and want to copy it to a our main server (running ssh).

I have a 3 year old svn repo I just converted to git using git-svn. Then I cloned the new repo and want to copy it to a our main server (running ssh).

The git project is organized like this:

~/server.com/
~/server.com/.git
~/server.com/htdocs
~/server.com/includes
etc.

Following the instructions in the gitpro book, it says to use scp -r to copy it to t开发者_如何学Che server, but I'm ending up copying the checked-out/cloned files, not just the git stuff, which I don't want (according to the book it should be "bare"). Do I just do "> scp -r ~/server.com/.git user@other.server:/path/to/git-files"? And then clone via "> git clone user@other.server:/path/to/git-files/server.com/.git"?

Also, the repo's they toss around in the gitpro book are like "server.git"; is that just a naming convention?

Links:

http://www.jonmaddox.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/ http://progit.org/book/ch4-2.html

TIA, Hans


Okay, confusion cleared up, I needed to do this, which didn't resonate with me at first:

git clone --bare server.com-git-svn server.git

Then scp. FYI for future searchers...

0

精彩评论

暂无评论...
验证码 换一张
取 消