整个故事:
获得第一个非常小的项目
$ cd local_rep
$ git clone http://address/proj.git .
好的,让我们检查一下
$ ls
.git
READ.ME
现在我想从svn中添加一个项目(总的来说,保留历史记录)
$ git svn clone --no-metadata -A usr.txt svn://old-repo/bank bank
似乎工作,但现在我无法推动我的全新本地项目"银行"在远程git服务器上。我试过了:
$ cd bank
$ git remote add origin http://address/proj.git
$ git push --set-upstream origin master
我得到了
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'http://address/proj.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
不明白为什么,因为
$ cd bank
$ git log
我可以看到我本地存储库的历史记录!?