克服 git svn 警告 [英] Overcome git svn caveats

查看:29
本文介绍了克服 git svn 警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读 git-svn 的警告.通过这个问题.

我的理解是:

如果您在 git repo 上镜像 svn 主干、分支等,请不要在这些分支上本地合并或变基任何内容.具体master指向trunk.

If you are mirroring svn trunk, branches etc on git repo, don't merge or rebase anything locally on those branches. Specifically master points to the trunk.

我的观点是,这会使 git-svn 瘫痪.如果我不能从 master 分支然后将该更改的分支合并回 master,那么 git 有什么意义?也许我在警告中遗漏了一些警告,即可以在没有任何变基的情况下合并具有相同父级的某些分支.

My point is that, this would make git-svn crippled. What's the point of git, if I can't branch from master and then merge that changed branch back into the master? Perhaps I am missing some caveat in the caveat that says it is ok to merge certain branches that have the same parent without any rebases.

谁能告诉我什么是需要避免的,什么是允许的.我想要本地分支,如果有必要,那些需要被镜像和合并,最重要的是 git 应该比 svn 进行合并.

Can anyone point to me exactly what needs to be avoided and what is allowed. I'd want the local branches, if necessary, those need to be mirrored and merged and most importantly git should do the merges than the svn.

如果我使用 git 分支来镜像 svn 分支并且我无法合并 git 分支,那么 git-svn 到底有什么意义?

If I am using git branches to mirror svn branches and I cannot merge git branches, whats really the point of git-svn anyway?

推荐答案

你可以合并 git 分支,也就是那些不是直接从 SVN 镜像的分支.

You can merge git branches, that is the ones which aren't directly mirrored from SVN.

我希望拥有自己的一组 Git 分支,由git-svn"分支组成,并定期在所述git-svn"分支之上重新定位.
这样,我在 Git 存储库中本地完成所有我需要的合并,然后我挑选我需要的东西来更新git-svn"分支,这样我就可以安全地 dcommit 而不必担心关于git-svn的CAVEAT部分中提到的第一个父级

I would to have my own set of Git branches, made from the "git-svn" branches, and rebased regularly on top of said "git-svn" branches.
That way, I do all the merges I need locally in the Git repo, then I cherry-pick what I need in order to update the "git-svn" branches, that I can safely dcommit without worrying about the first parent mentioned in the CAVEAT section of git-svn

这篇关于克服 git svn 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆