使用ac2git和bitbu

2024-09-30 00:35:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用ac2git将accurev仓库转换为git仓库。我能够成功地进行转换,但是当我在创建新存储库之后按照步骤操作时,我无法推送表示accurev事务的更改,这些更改现在是提交的。你知道吗

我的意思是我丢失了历史记录,当我检查bitbucket上的提交选项时,我只能看到hist和diff文件。你知道吗

我遵循以下步骤:

python ac2git.py
cd existing-project
git add --all
git commit -m "Initial Commit"
git remote add origin http://****@bitbucket.******.git
git push -u origin master

我是新来的比特桶,所以我不知道是什么问题?以前有人试用过这个accurev->;git->;bitbucket吗?你知道吗

换言之,如何将ac2git创建的本地git存储库移动到bitbucket上的新存储库?

The commit in bitbucket gives me the diff.xml/hist.xml/stream.xml


Tags: 文件gitgtaddbitbucket历史记录选项步骤
2条回答

第一步是在BitBucket中创建存储库。然后您只需按照BitBucket的说明进行操作:

cd /path/to/my/repo
git remote add origin http://****@bitbucket.******.git
git push -u origin  all # pushes up the repo and its refs for the first time
git push origin  tags # pushes up any tags

我不能百分之百肯定这是真的,但值得注意的是,ac2git脚本在refs/ac2git/*refs下存储了大量元数据,包括一个refs,它将在流的每个事务的提交历史中存储hist.xmlstreams.xmldiff.xml。参见how_it_works.md,它解释了refs/ac2git/depots/<depot_number>/streams/<stream_number>/info。你知道吗

尽管这个ref充当一个分支,但不应该通过调用git push origin -u -all来提升它,因为文档声称这只会将事情推到refs/heads/之下。但是,如果出现错误,脚本可能无法正确签出已转换的分支,它可能会使本地存储库处于分离头状态,在该状态下它将实际签出一个内部引用。你知道吗

我不知道在这种情况下,git push origin -u all对于一个全新的Bitbucket repo会做什么,但是如果它将您的HEAD ref推到repo上,那么您将在远程获得这个元数据。你知道吗

不过,目前这只是一个理论,希望有人能够利用这些信息为您拼凑出一个更清晰的解决方案。你知道吗

相关问题 更多 >

    热门问题