我目前正在尝试将我们的cvs存储库迁移到git,因此需要所有旧数据,但我遇到了一些问题。
导入作品。
首先使用cvs init
CVSREPOLOCAL
制作本地简历
从旧驱动器复制projectname
,然后
git cvsimport -d /home/git/CVS_REPOLOCAL projectname -C projectname.git
gitosis还配置为允许写入projectname
[group projectname]
members joe jim tom bart
writable = projectname
在本地机器上:
git clone ssh://git@server/projectnane.git
更改文件并执行:
git commit -a
[master 8a3d0f7] test
1 files changed, 1 insertions(+), 1 deletions(-)
gitk
显示我的更改为新主人
...但是在尝试为项目中的其他人提供更改时:
git push
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 432 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To ssh://git@k.....git
! [remote rejected] master -> master (branch is currently checked out)
有没有办法保留旧的导入数据,仍然可以为多个用户获取ssh gitosis?
我有一个正在运行但没有cvs导入所以不是解决方案:(
答案 0 :(得分:0)
您有三种选择:
git checkout HEAD@{0}
)上分离头或查看另一个分支(git checkout -b cvsimport
)。