Kzq*_*qai 42 git git-svn repository git-clone
我正在开始使用git repo与svn repo进行交互.svn存储库设置正常,只需提交一个基本的README文件.
检查出来工作正常:
tchalvak:~/test/svn-test$
svn checkout --username=myUsernameHere http://www.url.to/project/here/charityweb/
A charityweb/README
Checked out revision 1.
Run Code Online (Sandbox Code Playgroud)
当我尝试在git中克隆存储库时,第一步显示没有错误...
tchalvak:~/test$
git svn clone -s --username=myUserNameHere http://www.url.to/project/here/charityweb/
Initialized empty Git repository in /home/tchalvak/test/charityweb/.git/
Authentication realm: <http://www.url.to/project/here:80> Charity Web
Password for 'myUserNameHere':
Run Code Online (Sandbox Code Playgroud)
...但是导致无用的文件夹,不包含文件,没有分支,也没有提交:
tchalvak:~/test$ ls
charityweb
tchalvak:~/test$ cd charityweb/
tchalvak:~/test/charityweb$ ls
tchalvak:~/test/charityweb$ ls -al
total 12
drwxr-xr-x 3 tchalvak tchalvak 4096 2010-04-02 13:46 .
drwxr-xr-x 4 tchalvak tchalvak 4096 2010-04-02 13:46 ..
drwxr-xr-x 8 tchalvak tchalvak 4096 2010-04-02 13:47 .git
tchalvak:~/test/charityweb$ git branch -av
tchalvak:~/test/charityweb$ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
tchalvak:~/test/charityweb$ git fetch
fatal: Where do you want to fetch from today?
tchalvak:~/test/charityweb$ git rebase origin/master
fatal: bad revision 'HEAD'
fatal: Needed a single revision
invalid upstream origin/master
tchalvak:~/test/charityweb$ git log
fatal: bad default revision 'HEAD'
Run Code Online (Sandbox Code Playgroud)
我如何得到我可以回复的东西?我希望我在这个过程中做错了什么,但是什么?
Gre*_*con 67
您使用了该-s选项git svn clone,但是从您的示例中,您的Subversion存储库似乎没有使用标准布局(即存储库根目录中的主干,分支和标记目录).
如果是这种情况,请不要克隆-s.