我正在使用SubGit同步Git和SVN repos.克隆远程Git仓库时,我想保留该仓库的所有历史记录.我目前遵循的步骤允许我仅复制主分支的历史记录:
svnadmin create svn_repos
subgit-1.0.0-EAP_1381/bin/subgit configure svn_repos
subgit-1.0.0-EAP_1381/bin/subgit install svn_repos
git clone svn_repos gitRepo
cd gitRepo/
git remote add -f newRemote git://127.0.0.1/gitRepo
...
From git://127.0.0.1/gitRepo
* [new branch] FirstProductionTag -> newRemote/FirstProductionTag
* [new branch] SecondProductionTag -> newRemote/SecondProductionTag
* [new branch] ThirdProductionTag -> newRemote/ThirdProductionTag
* [new branch] bugfix -> newRemote/bugfix
* [new branch] bugfix2 -> newRemote/bugfix2
* [new branch] master -> newRemote/master
git merge -s ours --no-commit newRemote/master
git read-tree --prefix=foo/bar/ -u newRemote/master
git commit -m "Merged new …
Run Code Online (Sandbox Code Playgroud) 我正在使用Subgit访问Subversion仓库.它工作得很好,但有时,特别是在与使用普通Subversion客户端访问存储库的用户进行通信时,我真的很想找到特定变更集对应的SVN版本.
我可以使用git
在我的本地仓库中找到SVN修订号吗?
我们有2-3个2-3人的小团队.我们都使用git for local和svn for central repository和git-svn得到同步.这是有效的,除非我们想在团队之间共享我们的代码.
所以我们尝试了git pull,这会产生很多冲突,并且它不会检测到我们在同一棵树上.它获取所有更改(与克隆相同然后拉)当然我不想克隆完整的回购.每次我想分享.
请建议更好的流程.
我正在测试SubGit作为从SVN迁移到Git的一种方式.
我想要做的是能够在git存储库中创建远程分支,所有用户都可以使用它不会同步回SVN.
我只希望SubGit跟踪主分支并将其同步回SVN,以便我们可以自由使用和共享其他Git分支.
有一个简单的方法吗?
谢谢
因此,使用Subversion mirror(SubGit)和最新的BitBucket(4.8.3)。对母版进行了两项更改。一种是直接制作的,另一种是通过要素分支的合并制作的。推送更改时,出现SubGit错误:
XC2T@B104315 MINGW64 /c/projects/repos/loct-demo (master)
$ git push
Total 0 (delta 0), reused 0 (delta 0)
remote: error: The following ref update is disallowed:
remote: error: refs/heads/master: leads to replacement of SVN branch 'trunk'
remote: error:
remote: error: You can allow branch replacements by setting svn.allowBranchReplacement = true in SubGit configuration file.
remote: Fetching revisions from SVN repository:
remote: up to date
remote: Sending commits to SVN repository:
To http://XC2T@localhost:7990/scm/loct/loct-demo.git
! [remote rejected] master -> master (pre-receive hook declined) …
Run Code Online (Sandbox Code Playgroud) 作为Windows用户,我们创建了一个带有文件夹层次结构的svn repo.底部节点包含svn标准布局:
ProjectA/
ApplicationOne/
ModuleX/
trunk/
branches/
tags/
ApplicationTwo/
ModuleY/
trunk/
branches/
tags/
Run Code Online (Sandbox Code Playgroud)
......等等无限期.repo现在包含大约100多个带有trunk/branches/tags结构的真实svn项目,但是它们几乎都不在顶层.
我如何配置subgit来处理这个?
我正在使用简单的按时导入将现有的SVN存储库迁移到GIT.
$ subgit import --svn-url http://svn/repo repo.git
Run Code Online (Sandbox Code Playgroud)
一切正常,但有没有机会在SubGit创建的每个GIT提交中包含相应的SVN修订号?
我使用subgit将旧的svn存储库转换为git(包括完整的历史记录,分支,标记).经过一些初步的麻烦,我得到了它的工作,它几乎完美的工作.除了分支似乎没有合并回主干/主分支:
正如你所看到的,git知道我将绿色主人分支以获得黑色分支.但它似乎并不知道这个分支在提交时被合并回主服务器73653d1
.它看起来就像我放弃了那个分支,并在master分支中的一次提交中独立实现了所有这些.
这不是正确合并的样子,对吧?有没有办法来解决这个问题?请注意,这是历史上约50次提交,除了看似缺失的引用之外,代码还可以.
我正在尝试使用SubGit但是我遇到了分支的问题:我希望在Git下创建的分支只能在Git中生存和死亡.我发现了这个:SubGit:如何排除分支?,但它说
麻烦来自合并提交:如果提交A是将分支foo合并到主服务器的结果,则SubGit在Subversion端为commit A的相应父服务创建分支/ foo.如果您不希望SubGit生成的分支包含在branches/*namespace中,请考虑在Subversion端使用一些特殊的分支
我不想搞乱SVN,因为我正在评估Subgit,我不想在SVN上做任何改变.我想我可以在推送到Git存储库之前通过重新定位来实现我的目标(意思是,仅提交SVN合并历史而不是git分支),但我担心这会在返回SVN时导致冲突.关于我如何解决这个问题的任何想法,而不是等待SubGit 2.1版(声称做我想要的但不是在不久的将来 - 来自链接的答案:)it's going to take some time before we implement it
?